tags:

views:

355

answers:

3
Math.Sign(int.MaxValue);

I hit F11 to step into it and it steps right over it. I have all the options set for debugging .NET framework source (I think).

Edit: for someone with Visual Studio 2008 SP1 and .NET 3.5 SP1 who can step into this line successfully: what is the size of your .pdb file?

Edit 2: because I can successfully step into System.Windows.Forms, I'm fairly certain I have a corrupted symbol cache, but every time I try to reload the symbols, it re-downloads as only 763KiB.

Edit 3: Is it possible that it I can't step into System.Math.Sign because System.Math source code simply isn't released/available?

+5  A: 

You need to load the symbols for mscorlib.dll first.

Click Debug, Windows, Modules, then right-click on mscorlib.dll and click Load Symbols.

Then, try again. FYI, the simplest way to make sure that .Net source debugging is working is to try to view the source of a method in your call stack.

SLaks
I tried this. "Symbol status" says "Symbols loaded." The .pdb file is 763KB; is this the right size?
Sam Pearson
No, it isn't. For .Net 3.5 SP0, my mscorlib.pdb is 8,252 KB. Try deleting the .pdb file from the symbol cache and and trying again.
SLaks
A: 

context? can you provide the entire method body? Add some other calls to the Math class in a SEPERATE method does the problem still occur? Add some other calls to the Math class in a SEPERATE class does the problem still occur?

Create a brand new cmd line C# project and add the Math.Sign() call to the Main entry point. Does the problem still occur?

These tests should help you narrow down the scope of your problem.