Debugging Visualizers in Visual Studio 2005

Posted by: Scott on Writing, on 13 Jan 2006 | View original | Bookmarked: 0 time(s)

One of the cool new features of Visual Studio 2005 is the Debugger Visualizer, which provides an alertnate way to view an object in the VS 2005 debugger. What's especially cool about these little gems is that not only does Visual Studio ship with a number of buit-in visualizers for viewing long strings, XML, HTML, images, and so on, but also provides a mechanism for developers to be able to create their own visualizers and plug them into Visual Studio. (See Creating a Debugger Visualizer Using Visual Studio for more information.)

Yesterday, Scott Guthrieposted a blog entry about free debugger visualizers released by various folks in the community, such as an XML visualizer, and a regular expression visualizer. What really caught my eye, though, was K. Scott Allen's control hierarchy visualizer. With this visualizer you can view the control hierarchy rooted at the control whose little magnifying glass icon you click toload the visualizer.

SinceScott kindly gives the source code for hisvisualizer, I was able to poke around and add a new feature: in addition to seeing the controls in thehierarchy I also added nodes for the controls' properties (and their values). This required just a few lines of code to perform the reflection on each control in the hierarchy. (FYI, it takes a couple seconds to load up on pages with rather large control hierarchies...) Plus I added a little color and icons, just to spruce things up a tad. :-)

You can download my additions to Scott's visualizer: To quote from Scott's blog entry:

To install the a visualizer you have to build the source code. You canbuild with Visual Studio, or from the command linemsbuild OdeToCode.WebVisualizers.csproj, assuming msbuild.exe is in the path.Copy the .dll from underneath the bin directory into MyDocuments\Visual Studio 2005\Visualizers. VS will automatically load the assembly when debugging, and inspect the metadata inside to know what types to visualize. Note: custom visualizers won't load for a web site running at less than full trust.

Category: Visual Studio | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 2664 | Hits: 170

Similar Posts

  • Video: CodeRush Metric Shader Plugin more
  • My History of Visual Studio (Part 10, final) more
  • My ASP.NET MVC stack and why I chosen it more
  • My History of Visual Studio (Part 7) more
  • My History of Visual Studio (Part 6) more
  • "ADO.NET Entity data model" or "edmx" or "L2E" debug visualizer more
  • Debugger Visualizers not working in ASP.NET Medium Trust more
  • Multi-Targeting Support (VS 2010 and .NET 4 Series) more
  • How to Enhance Projects Using MSBuild on a Machine Without Telerik OpenAccess ORM Installed more
  • Visual Studio Short Keys and Some Tips and Tricks more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD