好的,我有:

Visual Studio 2010 RC, W7 x64,启动了一个新的项目类型的Silverlight应用程序。在ASP中托管Silverlight应用程序。NET Web应用程序项目。Silverlight 3.0版。 添加了一个LinqToSQL类,一个WCF服务,一个Winform测试应用程序(解决方案中的项目)和一些类(也作为解决方案中的项目)。

昨天,我突然得到了“断点当前不会被击中”。本文档未加载任何符号。'消息出现在IDE中,但它只影响Web Appliaction,我可以调试Silverlight和Winform应用程序。

我尝试/做了什么来摆脱这条信息:

Reset Visual Studio Settings removed all files in every \Temporary ASP.NET Files Folder (there is one for each 32bit/64bit and for Framework 2.0 and 4.0) tried to debug using Visual Studio Integrated Web server - normally I use IIS, in the project output of the solution I deleted every obj and bin folders in every project folder created a new solution and added all the projects to this new solution deleted the solution suo file created a new ASP.NET Web Application to test if it is a VS-installation issue => I can debug this new project/solution rebooted the machine several times repaired the vs.net installation did an IISReset removed the Web App from IIS used the Create Virtual Directory Button under Project Properties of the Web App to create a new Web App in IIS changed the Framework Version of every project from 3.5 to 4.0 Opened the Solution on my second machine => same behavior crawled Microsoft Connect for bugs / similar issues SPENT 7 HOURS.

这是我人生中第二次这样了。上次我通过删除临时ASP解决了这个问题。NET文件文件夹,但这次我需要你的帮助。


当前回答

我有一个类似的问题,除了我的问题是愚蠢的-我有2个内置的web服务器运行在2个不同的端口和我的项目->属性-> web ->“启动URL”指向一个固定的端口,但web应用程序实际上并没有在该端口下运行。所以我的浏览器被重定向到“开始URL”,它指向1539,但代码/调试实例在端口50803下运行。

我将内置web服务器更改为在固定端口下运行,并调整了我的“起始URL”以使用该端口。 项目->属性-> web ->“服务器”部分->“使用Visual Studio开发服务器”->特定端口

其他回答

我也有同样的问题,但在VS2013的Web应用程序。对我来说,答案是更新构建配置的解决方案:-

右键单击解决方案并选择属性 选择Debug配置 选择trivet中“Configuration Properties”下的“Configuration” 为每个要调试的项目选中“Build”框

一旦我这样做了,所有的断点都开始工作了。

我采取了最简单的路径,实际上在我的多个项目解决方案中,包括一个类库,我有一个问题,由类库项目创建的.dll文件不允许我在执行时有断点,因为它不是由于某种原因构建的,我单独构建该项目并引用它的输出.dll,现在断点是功能性的

不确定,也许这个能帮到你;如果不是你,那就找一个像我这样的新人吧,因为这对我来说很管用:)

If you are having problems with Silverlight projects the solution can be fairly simple. According to my experience in many cases debugging symbols are not being loaded due to the new ".xap" files not being deployed to temporary folder (either internal VS Cassini or IIS Express). In this situation full rebuilds or resetting VS settings won't help. The easiest solution is just to delete temporary internet files within your browser. If you are using IE for Silverlight development and testing I would recommend switching on "Delete browsing history on exit" option in order not to have such issues in the future.

我也遇到了同样的问题,在谷歌了一下之后,我找到了两个典型的解决方案:

确保在. web项目中激活了Silverlight调试器。打开项目属性,在“Web”选项卡下选择Silverlight调试器。 重新启动Visual Studio,删除所有bin和obj文件夹。

但这些对我都没用。然后有人在帖子后面提到尝试使用IE作为浏览器。这使得调试和断点再次工作!

编辑:

后来我遇到IE9无法工作的问题,因为它附加了错误的进程。我发现了一个巧妙的技巧,而不是每次都手动连接到正确的IE进程:

右键单击.Web项目(.html或.aspx)中生成的一个页面 点击“浏览…” 设置IE为默认浏览器(只会影响Visual Studio的浏览器选择)

现在,Visual Studio将在运行. web项目时启动IE并附加到正确的进程。这样就行了。

我刚刚根据部署Silverlight应用程序解决了这个问题。(这个答案是其他一些答案的重复,但我会尝试更彻底地解释它。)

问题很可能是你的Silverlight应用程序在构建/启动时没有正确部署到你的web应用程序。这是一个参考问题——理解起来很简单,但第一次遇到时并不明显。

就像任何其他项目引用一样,被引用项目的输出应该复制到引用项目的bin文件夹中,以便进行调试。对于类库,当你右键单击并选择“添加引用…”时就会发生这种情况。对于Silverlight,你应该通过Project Properties添加一个引用。

右键单击项目,选择“属性” 选择左边的“Silverlight Applications”选项卡 按“添加…”按钮,然后从对话框中选择你的Silverlight项目

这将从宿主web应用程序中添加一个引用到Silverlight应用程序,并确保xap文件将在构建或部署时复制到web应用程序中。这意味着当前Silverlight应用程序及其调试文件都在正在调试的应用程序中,您将能够逐级检查代码。