tags:

views:

814

answers:

1

I've been doing some MSIL work and have come across references to these three debuggers.

  • What's the difference between them?

  • Is one of them better than the others wrt. functionality?

  • Are there others that I have missed?

+8  A: 

I'm assuming you meant DbgClr not Clt and mdbg not mdbug?

Visual Studio is one you missed, but DbgClr should have the same functionality. http://blogs.msdn.com/andypennell/archive/2005/02/21/377621.aspx.

You can also use windbg with SOS extensions to do managed debugging from Windows debugger. SOS is also helpful when using VS since it lets you inspect memory and so on.

To see source level MSIL debugging, try using ilasm with the /debug option. Last time I checked, VS will let you step through the .il source just like C# or any other language.

MSDN blogs have a ton of content about debugging .NET apps -- I suggest you search further there.

MichaelGG
Thanks. Did you mean ilasm with the /debug option? How do I use VS to step through an /il source? I load it in VS but the F5 and F6 buttons do nothing?
nzpcmad
Oh, yes, ilasm. I believe you just start or attach to the process. VS won't build and execute IL code, but it will load symbols for a process, and those symbols can point to the .il.
MichaelGG
One important thing to note is that the VS debugger will only step through IL instructions or allow you to set breakpoints at the "statement" level. Within IL a statement is roughly a set of instructions that result in the evaluation stack being empty. If you had "ldarg_0""call Object.ToString""stloc_0"These 3 instructions would be one statement. You can set a breakpoint at the "ldarg_0" instruction, but not at the "call Object.ToString" instruction.
Scott Wisniewski