Problem solve Get help with specific problems with your technologies, process and projects.

.NET Framework Tools: CLR Debugger

Though it has a few limitations, Microsoft's CLR Debugger, based on the look and feel of the VS 2005 debugger, is a must for anyone who works with the CLR, Ed Tittel writes.

Those who work with .NET will definitely want to check out Microsoft's library of .NET Framework tools, part of the company's .NET Framework SDK available online. As part of this library, you'll find a very useful CLR Debugger, otherwise known as DbgCLR.exe, ready for you to download and use it in your everyday work.

As its name implies, this tool provides debugging services to help application developers find and repair bugs in programs that incorporate the Common Language Runtime (CLR). What makes it particularly interesting and useful is that it provides a graphic interface to help aid this process -- a great improvement over old-fashioned methods that involve step-by-step code execution or instrumenting code so it can report on what it's doing (and hopefully, on what's going amiss). Those already familiar with the Visual Studio 2005 debugger will find this tool quite familiar, because this CLR debugger is based on ongoing efforts to create and maintain the Visual Studio 2005 debugger.

What's different about the CLR debugger is that it doesn't implement all the features found in the Visual Studio 2005 debugger. Some what's not available is as follows:

  • The CLR debugger does not support debugging of Win32 native code applications; it only works on applications written and compiled for the CLR.
  • Remote debugging is not implemented.
  • Though the Registers window is implemented, no register or pseudoregister information is available when using this tool. Though the Disassembly window is implemented, it shows disassembly code for Win32 native code rather than CLR code—thus it's not really relevant to CLR developers.
  • The CLR debugger does not support F1 help functions.
  • The CLR debugger does not support the Autos window feature.

    Using the CLR Debugger requires that you work with solutions to associate source files with the applications being debugged. A solution is created automatically when you open a compiled application along with associated source file(s). Thereafter, whenever you want to debug, simply open the application instead of loading the source file and compiled application separately. The first time you use this tool, you must select a program to debug from the debug menu, locate the program and provide any arguments it needs, after which you must open all related source files. After that, the solution is available for use instead.

    If you work with the CLR, you owe it to yourself to learn and use this tool.

    Ed Tittel is a full-time writer and trainer whose interests include XML and development topics, along with IT Certification and information security. Send comments, queries, or suggested topics or tools for review to Ed at [email protected].
  • Dig Deeper on .NET Framework security tools