Unable to debug .NET framework code in VS2010

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 ?


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


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


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. 
链接地址: http://www.djcxy.com/p/52886.html

上一篇: 用Python提取MP3音乐的节拍

下一篇: 无法在VS2010中调试.NET框架代码