Unable to debug .NET framework code in VS2010

五迷三道 提交于 2020-01-03 08:38:52

问题


I'm trying to debug .NET code with public available symbols. I setup according instructions:

In Tools-> Options -> Debug I checked "Enable .NET framework source stepping", disabled "Enable just my Code".

In Tools-> Options -> Debug -> Symbols Load All Symbols. I checked a lot of *.pdb's appeared in this folder.

In ASP.NET MVC application I place breakpoint into Application_Start() method.

After debugger run I see call stack, see all methods in call stack (System.Web.dll). But if I try to double click it, only I see is diassembled code (or message - no source code availble).

What could be the reason ?


回答1:


Do you have VS2010 SP1 installed? If yes than goto: http://social.msdn.microsoft.com/Forums/en-US/refsourceserver/thread/41388c7b-582b-4e3f-8178-3d38a3c99639




回答2:


Sounds like the symbols are not loading, perhaps due to a version mismatch. I've had issues in the past getting the proper symbols to load. I've always solved it by pointing to the Microsoft symbol server. The article below gives step by step instructions on how to setup debugging for the .NET Framework. In the third section "To load Framework symbols using the Modules window", it describes using the Microsoft Symbol server.

http://msdn.microsoft.com/en-us/library/cc667410.aspx




回答3:


We had the same issue recently after a Windows 10 update. Debugger of VS 2013 was unable to find the source code and on a step in it was complaining of the missing source files: You need to find <filename>.cs to view the source for the current call stack frame and The debugger could not locate the source file <filename>.cs

The solution that worked for us:

Tools -> Imports and Export Settings -> Reset All Settings -> Select General after the save settings option. 


来源:https://stackoverflow.com/questions/6206847/unable-to-debug-net-framework-code-in-vs2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!