Andrej Tozon's blog

In the Attic


VS2005 Debugger Visualizers

Personally, I don't like debugging - the word itself suggests your code is buggy ;) But since this is an unavoidable fact and debugging plays one of the key parts in the development process, why not making this process more efficient and hmm, enjoyable?

Visual Studio 2005 introduced Debugger Visualizers, which help you, the developer, view different types of data in a "natural" way, while stepping through your code in the debugger. That is, strings are presented in a simple text box, datasets and datatables in a grid, etc. In fact, VS2005 comes with a few built-in visualizers, but the best part is this: you can write your own! Be that for one of .NET native classes, or for any of your complex classes that needs special rendering or presentation form.

I currently find the following Debugger Visualizers helpful:

  • IDesign's Visualizers pack - Image, Color and Sound visualizers. In source code; a nice starting point for learning how to write your own.
  • Team Agile Regex Kit - Regular Expressions Visualizers. Just released. If you use The Regulator, don't miss these.
  • RightHand.DataSet.Visualizer - More features than the built-in DataSet Visualizer. Currently free, but with expiration date set to 2/2/2006.
  • [Updated] Conchango Xml Visualizer - Nice Xml visualizer to replace or complement the built-in one; current version might have some problems with large Xml files.

I'm sure there are more visualizers available around the net. If I find more useful ones, I'll add them to this list. Suggestions?

[Update: ScottGu has also summarized some of Debugger Visualizers available to date]

On a side note: debugging is a process of improving your already written code by finding and removing programming errors, which cause program to behave differently from expected. If you want to further improve the quality of your code, you should define the behavior of your program, preferably before you write any code. Test Driven Development is a technique that will help you do that, but that's another post...