好的,我有:

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文件文件夹,但这次我需要你的帮助。


当前回答

我尝试重命名obj\debug文件夹中的.pdb文件,并做了一个干净的解决方案和重建。 它创建了一个新的.pdb文件,我能够正确地命中断点。

其他回答

如果没有调试最新的可执行文件,在远程调试时也会出现此错误。当您在远程调试时,不要忘记在本地开发机器上构建(重新)后将新代码移到远程机器上!

如果没有命中断点,则删除.xap文件。在志愿者项目。删除“YourProject.xap”。我已经尝试了所有以上和偶然发现这个修复,工作的每一次。明智的清理项目后删除以及。

我所做的解决这个问题是在我的断点没有击中的页面,我选择了文件夹>添加一个现有的项目,然后从其保存路径选择项目。这允许断点开始工作。

这个错误偶尔会出现,我总是可以将其追溯到相关程序集的项目设置。你不必“等待”,直到你的代码不能遵守断点或直到你设置了断点,才能知道哪些程序集加载了符号。

当您在调试模式下运行项目时,它将在输出窗口中列出哪些程序集具有如下加载的符号(您可能需要在新选项卡中打开图像)

所以在这种情况下,BASD.Core.Data.dll没有加载符号。因此,您可以将此程序集的项目设置与设法加载符号的另一个程序集的项目设置进行比较,以便弄清楚为什么有些程序集可以加载符号,有些程序集不能加载符号。

然而,“对我来说”,“每次”发生这种情况,都是因为没有创建调试信息。所以我在一个(c#)项目中打开项目属性>构建>高级。

所以对于上面的Basd.Core.Data.dll,即没有符号,高级构建设置是:

而对于Basd.Core.Configuration.dll,即我可以设置并命中断点的程序集,设置如下:

所以我在后一个项目中输出调试信息,而不是在第一个项目中,因此我能够在Basd.Core.Configuration.dll中命中断点

还要注意,对于给定的.dll,仅仅在项目的bin文件夹中有一个.pdb文件是不够的,因为它很可能已经过期,因此Visual Studio不能将其作为您试图过路的.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.