Andrew Arnott
Andrew Arnott

Reputation: 81821

How to debug through .NET Framework source code?

I've followed the steps outlined in http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx to enable source debugging of the .NET Framework, and I had it working in the past. Now that I'm using .NET 3.5 SP1, it seems to have stopped working. Beyond the steps in the blog entry I just mentioned, what special steps can I make to get source debugging working again?

Upvotes: 21

Views: 6181

Answers (4)

Nikola Smiljanić
Nikola Smiljanić

Reputation: 26863

Debugging didn't work for me when I first followed those steps. I deleted symbol directory and removed all settings from Options -> Debugging -> Symbols and it worked.

  • Uncheck "Enable Just My Code"
  • Check "Enable .NET Framework source stepping"
  • Check "Enable source server support"
  • Don't add anything to Debugging -> Symbols

Works just fine on Windows 7 x64 with Visual Studio 2008 SP1.

Upvotes: 1

Ana Betts
Ana Betts

Reputation: 74692

This is broken in the latest GDR, Microsoft needs to fix it

Upvotes: 5

kaze
kaze

Reputation: 4359

I had the same problem when I upgraded to .NET 3.5 sp1. It seems like it's very simplified with the sp1 release. Now you only have to check the "Enable .NET framework source stepping" (which automatically unchecks "Enable just my code"). You don't have to change anything in the "Symbols" settings anymore.

Upvotes: 4

Aamir
Aamir

Reputation: 15576

You probably need to refresh your downloaded symbols. In the Symbol settings dialog you specify a cache directory where symbols are cached. Since you have upgraded your .NET framework, therefore, the symbols cached there are most probably the older ones which won't work with the newer dlls. Just clear your directory and then download symbols for .NET 3.5 SP1 again.

Upvotes: 2

Related Questions