tags:

views:

1937

answers:

3

I frequently need to debug .NET binaries on test machines (by test-machine, I mean that the machine doesn't have Visual Studio installed on it, it's frequently re-imaged, It's not the same machine that I do my development on, etc).

I love the Visual Studio debugger, but it's not practical for me to install visual studios on a freshly imaged test-machine just to debug an assertion or crash (the install takes way too long, the footprint is too large, etc).

I'd really like a quickly installed program that could break into a running process, let me specify the location of symbols/source code, and let me jump right into debugging. For native binaries, windbg works great, but I haven't found anything similiar for managed binaries. Any recommendations?

(as a side note, I am aware of visual studios remote debugging capabilities, but for some reason it never seems to work consistently for me... I often have connection issues)

+3  A: 

There is always mdbg and cordbg, but I would suggest digging more into why remote debugging doesn't work consistently.

VS2005/8 seem a lot more reliable than earlier versions here (though I primarily do unmanaged) and it saves you from having to have the symbols accessible on the target machine.

Rob Walker
A: 

You could check out MDbg: http://blogs.msdn.com/jmstall/archive/2006/11/22/mdbg-sample-2-1.aspx. It looks like it comes with the .NET 3.5 SDK at least (and it's probably included with 2.0+).

Windbg has managed extensions (called SOS I believe), though I don't know if they allow source-level debugging.

There is a lightweight VS-based debugger called Rascal, though I'm not sure if it's available outside of Microsoft.

Brannon
+2  A: 

For a bit nicer interface than MDbg or cordbg take a look at DbgCLR - a cut-down version of the Visual Studio debugger (at least it looks like one) that handles only managed code. It comes with the .NET Framework (I'm not sure if it's in the runtime or if you need the Framework SDK):

Note that cordbg is deprecated in favor of MDbg (even though MDbg doesn't have all of cordbg's features):

And in looking back at MDbg whle writing this post, I found that there's a GUI wrapper available for MDbg (which I haven't tried):

Michael Burr