Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 295
Alexander Beletsky Avatar asked Jun 01 '11 19:06

Alexander Beletsky


2 Answers

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

like image 81
watbywbarif Avatar answered Oct 01 '22 09:10

watbywbarif


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

like image 23
Brain2000 Avatar answered Oct 01 '22 09:10

Brain2000