More Debugger Visualizer Goodness

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

Last week I blogged about Visual Studio 2005's Debugger Visualizers, and mentioned K. Scott Allen's control hierarchy visualizer,one of many free, community-driven visualizers that you can download and plug into Visual Studio 2005 today. I've been tinkering around with Scott's and others' visualizers over the weekend and decided to write an article on 4Guys about debugger visualizers: Improved Debugging with Visual Studio 2005's Debugger Visualizers.

In the article I present my first from scratch visualizer, one that applies to the System.Web.UI.Page data type and, when utilized, shows the server variables collection in a ListView. It's pretty trivial but provides a good starting point for those who are interested in creating their own custom visualizers. You can download the code from the article or from the My Code Projects page. Enjoy!

(I banged my head against a wall for several hours this weekend trying to get a visualizer to display the rendered contents of a control at any point in the page lifecycle. I know that Brett Johnsonoffers such a visualizer, but this control simply calls the RenderControl() method of the specified control, which carries with it some baggage. It's a technique I've discussed before, in Emailing the Rendered Output of an ASP.NET Web Control.Some potential issues with RenderControl()in ASP.NET 2.0 arise if you try to render a Web Form, since it tries to add the hidden input field to register events validation script. Of course this blows up because the Page will only happily do this if we're in the render phase of the page lifecycle. Similarly, if a user wants to render a TextBox directly, it'll complain that it's not within a Web Form.I tried to work around this by creating a faux Page class that overrode the VerifyRenderingInServerForm() method and EnableEventValidation property, but there are still some spots incertain controls that blindly reference the page's HttpContext object, which doesn'texist in the faux Page class. Urg.

If you have any ideas/workaround/solutions, I'd be delighted to hear them. Thanks!)

Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 2065 | Hits: 104

Similar Posts

  • "ADO.NET Entity data model" or "edmx" or "L2E" debug visualizer more
  • Debugger Visualizers not working in ASP.NET Medium Trust more
  • Use the DebuggerDisplayAttribute for your types more
  • How to diagnose Linq to SQL easily and production-ready more
  • Cool open source WCF tool more
  • A extension method for visualizing EntityStateObjects more
  • Pre-Order Professional Visual Studio Extensibility more
  • DebuggerDisplayAttribute Attribute more
  • Developing Linq to LLBLGen Pro, part 8 more
  • Releasing the Source Code for the .NET Framework Libraries 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