posted on March 13, 2007 16:24
Microsoft has done a great job with tools available for debugging applications in Visual Studio. Visualizers are Windows Forms dialogs that can be used to create graphical views of the value of objects. Sometimes trying to determine the value of data types such as XML or HTML can be very problematic if not impossible using the IDE. Using a Visualizer makes life much easier when working with these data types.
To view the Visualizers:
- Set a breakpoint at the variable you would like to visualize.
- Hover over the variable with the mouse until a dialog pops up.
- Click the magnifying glass
Select which Visualizer you would like to view your data with
Visual Studio has a few Visualizers built it.
- Text â€“ Renders the text in a rich text box.
- XML â€“ Renders the XML inside an Internet Explorer control
- HTML â€“ Renders html inside an Internet Explorer control
- Dataset â€“ Renders the dataset inside a data grid
Visual Studio also provides support to create your own visualizers. I have found this very helpful when working with objects that contain lists of objects.