Dbgclr is a framework debugger with a GUI that's similar in many ways to the Visual Studio debugger. In fact, it's largely based on work done for its bigger brother. Like Cordbg , it can debug only managed code. Unlike the Visual Studio debugger, it can't do remote debugging. Another restriction is its Registers window, which isn't very functional compared to its Visual Studio counterpart . Dbgclr also doesn't have any built-in help, and there isn't much information about it in the .NET Framework documentation.
Like Cordbg , Dbgclr ships with the .NET Framework. Its main use is for situations where Visual Studio can't be installed or would consume too much memory.
You can find Dbgclr.exe in the GuiDebug subfolder under your .NET Framework installation. Remember that, like Cordbg , Dbgclr is simply a debugger, so it won't launch the VB .NET language compiler like Visual Studio does. I find it useful to think of Dbgclr as a lightweight version of the Visual Studio debugger combined with a runtime-only version of the Visual Studio IDE. This avoids mental confusion because the two IDEs look very similar.
Dbgclr doesn't understand Visual Studio solutions directly, but it will build its own solution (suffixed with.dln) once you've specified an executable that you want to debug. To debug a program, you first need to compile it in debug mode, either using Visual Studio or the command-line compiler. Then you run Dbgclr and choose the "Program to debug" option from the Debug menu. When you've located your program executable, this will be added to a new Dbgclr solution. Next, you add the corresponding source file(s) to the solution using the File ’ Open ’ File menu option. Once you've done this, you can set breakpoints and start debugging your program using F5 or F11, just as you would do within Visual Studio.
Debugging within Dbgclr is very similar to debugging within Visual Studio. You have access to the same debugging windows and you can manipulate the same breakpoints. You can even attach to and detach from processes just like you can in Dbgclr 's bigger brother, although you can't attach to a process on a remote machine.
One little trick that can save you some time is to add a Dbgclr shortcut to your Send To menu. Assuming that the .NET Framework is installed in the default location, the shortcut to add is
C:\Program Files\Microsoft .NET\FrameworkSDK\GuiDebug\DbgCLR.exe
Then you can right-click any .NET executable in Windows Explorer and launch Dbgclr directly.