Can you step into .NET framework calls when debugging?

D

David Cater

I'm sure this is a question that a million people have asked, but I'm having
trouble finding the answer. I want to be able to step through .NET
framework code. Basically, I want to walk through the kind of code that
Reflector exposes (http://www.aisto.com/roeder/dotnet/) at run-time. I can
get a lot of information about the framework code just by reading the
disassembled code, but I really want to be able to step through it. It
would obviously be a lot easier to see what's going on and how the code
works if I can see which code paths are actually being followed in
particular situations.

Some information I've found on the net seems to imply that this is possible,
and others seem to say it isn't. I've found some sources that give
information about debugging at the IL level, but that's too low-level for
me. I don't want to debug at the opcode-level, I want to debug at the level
of disassembly that Reflector exposes.

I've setup Visual Studio 2005 to point to the Microsoft public symbol server
(http://msdl.microsoft.com/download/symbols), and that downloaded the .pdbs
for the framework and put them on my local hard drive (about 10MB worth). I
turned off the "Just My Code" option in the Debugging options, just in case
that was the issue.

Now I'm stuck. I try to step into Framework calls (like
TraceSource::TraceInformation and XamlReader::Load) and nothing happens. Is
there any way to do that? If not, what good are the PDB files? Aren't
those the files that have the debugging symbols? I suppose the PDB has
function names and variable names, but not the actual code, right?

I've also looked at MDbg a bit, and an extension that you can get to plug
into Visual Studio to work with it. But that debugger also seems to work at
the IL level.

Can anyone help me out?

Thanks,

David Cater
(e-mail address removed)
 
P

Peter Duniho

[...]
Now I'm stuck. I try to step into Framework calls (like
TraceSource::TraceInformation and XamlReader::Load) and nothing
happens. Is there any way to do that? If not, what good are the PDB
files? Aren't those the files that have the debugging symbols? I
suppose the PDB has function names and variable names, but not the
actual code, right?

That's exactly right. That's why you can at least now see the names of
the functions you can step into and whatnot. But without the original
source code somewhere (which isn't included in a PDB file), the PDB
doesn't offer a direct way to do that.

That said, it sure seems like what you're asking for should be possible.
Maybe a feature request for a future version of the debugger, to
automatically decompile a la Reflector for the purpose of debugging and
use those results in conjunction with a PDB to provide more readable
debugging.

I will be pleasantly surprised if this exists today, however.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top