Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I step into this line?

Tags:

c#

.net

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?

like image 489
xofz Avatar asked Jul 07 '09 22:07

xofz


People also ask

What does it mean to step into or step out of a function?

"Step into" will stop on the first executable line inside the function. Note, if you have optimisation enabled, the "first executable line" may not be the one you expect. 8/15/2021. 1and0. There is also a "Step Out" allowing you to step out of a function which you are currently stepping through.

What happens when we use step into while tracing?

Step into – An action to take in the debugger. If the line does not contain a function it behaves the same as “step over” but if it does the debugger will enter the called function and continue line-by-line debugging there.


1 Answers

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.

like image 57
SLaks Avatar answered Sep 21 '22 21:09

SLaks