Tuesday 6 January 2009

__ComObject Debug Visualizer

When debugging applications it is often useful to be able to browse members of types and explore an API at runtime. For managed types, this can be done through debugging tooltips. However when using an API that uses COM objects, debugging tooltips show little information. One API I know that relies heavily on COM is Visual Studio's extensibility API, and it's a pain to have to guess which objects are returned by what API call.

To ease the pain, I wrote a __ComObject debug visualizer; a debugger extension that displays the outline of a COM object. In the screenshot below you can see what the Visual Studio debugger would display when inspecting a COM object and the outline of the same object as shown by the debug visualizer.











(click for a larger image)

This debug visualizer is an initial stab at the problem and still a very basic implementation. It only shows the outline of a COM object. The visualizer doesn't allow to inspect property values or show the outline of their types. There is plenty of room for improvement, I already added some proposed features to my Issue tracker at code gallery.

If you want to give this debug visualizer a try: download it from the code gallery.

1 comment:

  1. I got an unhandled exception, couldn't load System.Core 3.5. Does this not support VS2005?

    ReplyDelete