好的,我有:

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


当前回答

对我来说,问题是我在项目设置的Build选项卡中启用了“优化代码”。

其他回答

你所面临的原因是PDB(“PDB代表程序数据库,一种专有的文件格式(由微软开发),用于存储程序的调试信息)不是最新的,这可能是由于一些原因:

1-正如Bevan所说,您可能正在调试另一个应用程序!

2-您正在调试同一应用程序的另一个版本。例如,您将以前构建的应用程序与当前版本的代码附加在一起进行调试,而无需(重新)构建它。

清理或重建解决方案为我解决了这些问题。

为了确保问题不是你的,试着在VS 2008上调试相同的应用程序(我担心这可能是VS 2010的一个bug——它仍然是测试版!)

尝试将Silverlight Application Project设置为启动项目:右键单击Project -> '设置为启动项目。然后按F5,看看你是否能捕捉到断点…

每次对silverlight应用程序进行更改时,尝试删除浏览器中的浏览/临时数据

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

我也有同样的问题。跟随对我很有用

进入web应用程序——> Properties——> Silverlight Applications

如果你没有在列表中看到你的Silverlight应用程序,然后点击添加,从“项目”下拉菜单中选择你的Silverlight应用程序,然后添加它。

我遇到过这个问题,但在我的情况下,这是因为我试图调试的模块延迟加载。我有一个链接到我的主项目的DLL, DLL是我正在调试的。DLL只在主应用程序中的某些函数被调用时才被调用,因此VS2010在这些函数被调用之前不会加载模块。

当我启动项目时,我收到了这条消息,但当我执行函数时,调试器已经加载了模块和相关的调试信息。

这个帖子对我帮助很大:http://geekswithblogs.net/dbutscher/archive/2007/06/26/113472.aspx