views:

509

answers:

3

I'd like to step into Microsoft's source code but cannot.

I followed the instructions at http://referencesource.microsoft.com/serversetup.aspx In particular, I disabled "Enable Just My Code" and Enabled "Enabled .NET Framework source stepping". Finally, set the source symbol location to "http://referencesource.microsoft.com/symbols".

However, when I double click on a frame item on the stack, I get some assembler code, not C# code. Also the "go to source code" menu item is disabled.

I am using VS 2008 SP1 and .NET 3.5 SP1. I created a brand new folder for the downloaded stuff. I get some pdb files but no C# file.

I looked at http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx and installed the path. Makes no difference. I am trying to the source code of WPF. The pdb are downloaded so it looks like Microsoft supports those.

Is there a trick to fix this?

+1  A: 

This has been asked a couple of times: perhaps one of these answers will help

Sam Saffron
Thanks for the tip. I couldn't find anything that would help though.
tom greene
A: 

Not all parts of the .net framework is available as reference source, but the parts that are (and steps for getting it up and running) is described in Shawn Burke's blog:

http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx

Update: Hmm. Broken on my machine too although it used to work. Weird.

KristoferA - Huagati.com
Thanks for your answerSince I can download the pdb, I assume Microsoft supports this part of the framework (WPF).I looked at the link, installed the patch - no difference.
tom greene
Hmm, you're right. It used to work on my machine but I haven't used it for a while. When I tried today, I can't get it to work. It downloads the PDBs alright, but gives a "source code not available" error whenever I try to step into framework code... Odd. I guess gix's answer is the explanation - mismatching versions and outdated symbols on the reference source server...
KristoferA - Huagati.com
+1  A: 

As far as I have observed .NET framework stepping with the reference source works just fine with the guides you find everywhere. With VS SP1 you don't even have to add the path to the reference source server.

But the problem are mismatched versions. The framework assemblies were updated with .NET 3.5 SP1, Vista SP2, Windows 7, ... but their reference source PDBs weren't made available. The corresponding reference source forum seems quite dead, too. I remember reading that it took them a bit longer to push out the initial symbols because they built an infrastructure that would allow them to push new versions quickly. Either that didn't really happen or they don't use it.

gix
I am using .NET 3.5 SP1. Are you saying I can't use framework code debugging?
tom greene