Click here to Skip to main content
12,549,320 members (45,072 online)
Click here to Skip to main content
Add your own
alternative version


19 bookmarked

Enhanced QuickWatch

, 7 Apr 2006 CPOL
Rate this:
Please Sign up or sign in to vote.
A Visual Studio .NET 2003 add-in to view XML, Datasets and Exceptions
Sample Image - DebugViewerImg.jpg


I finally found time to post the Enhanced QuickWatch add-in for VS.NET 2003. About a year ago, I developed the Add-In using the basic concept and code from a few posts and added several other useful features that are of immense help when trying to visualize XML Serializable Objects, DataSets, XML Documents and Strings, Exception Stacks, etc. Just as I was planning to upgrade to VS.NET 2005, I decided to make an effort to post the Add-In for VS.NET 2003.

Several people need to be thanked for ideas, code and implementations. I can't remember all the sources but the basic concept and code was from a couple of developers, Mohammed Barqawi and Matt Simner amongst others. I also used XmlVisualizer.UI.ScintillaControls.dll, one of the Wrapper controls for Scintilla Editor.

What It Does?

The Enhanced QuickWatch provides visualization of the following.


  • Right click on the variable in debug mode and click the Enhanced QuickWatch menu item. If this fails to select the right variable , you can try selecting the whole variable and try the same. The rule is written such that if no selection, it uses the TextSelection classes method WordRight() and WordLeft() to determine the variables length. You can view the selected variable in the code as it is highlighted.
  • You can continue using the QuickWatch even after the debugging session ends as the window will remain open. You can also right click and launch the add-in in the source code in Visual Studio or launch it from the tools menu when not in debug mode, which is helpful for loading XML files to visualize as datasets and/or use the XML viewer.
  • DataSets, strongly typed DataSets, DataTables and DataRows.
  • XML representation of the DataSets and its XmlSchema are retrieved by GetXml() and GetXmlSchema() methods.
  • The DataSets tables are displayed in separate tables and two tabs are used to display the list of Tables and Relationships in the DataSet.
  • When visualizing a DataTable or DataRow, the tab will be auto selected.
  • Ensure that when viewing DataTable Or DataRow that they are part of a DataSet, because the QuickWatch rebuilds the dataset from the evaluations of GetXml() and GetXmlSchema() calls on the DataTable/DataRow's associated Dataset.
  • XmlDocument, XML strings, Objects that have ToXml() methods.
  • When viewing XmlDocuments or XML string, the XML will be loaded into a dataset and displayed in the appropriate Tab to provide alternate visualization.
  • Exceptions can be viewed in the exception viewer control and clicking the appropriate line in the stack trace will open the code file and highlight the line the exception occurred.
  • A Row Filter can be established for active or deleted rows, using standard row filter expressions.
  • There is no need to select the whole variable to view, only right clicking on the variable name and clicking the Quickwatch from the menu will do the trick.
  • If any unsupported type is found, the default ToString() representation of the object is displayed.
  • Separate Tab is used to display any errors occurring during parsing and/or display .
  • Load XML Files from the file menu in order to check the dataset representation of the XML files.

Using the Code

I got a request for the source code, so I removed customizations that I was using specifically for my projects, but there might still be some unimplemented menu items that might be disabled or invisible.

I believe the source code is self documenting, but I'd mention that I have separated the major features into separate projects. The main solution DebugViewer.sln is in the DebugViewer folder. There are several test projects I created for testing individual components and zipped up the whole project folder structure so you might find unnecessary files.

I only spent limited time on this project and haven't had the time to refactor it once it got stabilized. I did encounter a couple of issues (I use it daily and have had about 2-3 issues in the past year) and didn't investigate into the root cause. Please feel free to enhance, add features or fix bugs if encountered.


  • 7th April, 2006: Initial post


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Sudhin Devarachetty
United States United States
No Biography provided

You may also be interested in...


Comments and Discussions

Questionexp.Value is not complete but truncated.... Pin
anupam45615-Apr-09 23:27
memberanupam45615-Apr-09 23:27 
Generalplease help me make this work for VS 2003. Pin
TCDooM30-Jun-07 19:59
memberTCDooM30-Jun-07 19:59 
AnswerRe: please help me make this work for VS 2003. Pin
icedragon12-Jul-07 3:06
membericedragon12-Jul-07 3:06 
GeneralRe: please help me make this work for VS 2003. Pin
BirgerD1-Aug-07 21:05
memberBirgerD1-Aug-07 21:05 
GeneralDoesn't work for me Pin
emunews22-Oct-06 7:00
memberemunews22-Oct-06 7:00 
GeneralNothing happens... Pin
Przemaas14-Apr-06 3:14
memberPrzemaas14-Apr-06 3:14 
Generalnot working for me... Pin
travislaborde11-Apr-06 2:53
membertravislaborde11-Apr-06 2:53 
GeneralRe: not working for me... Pin
Sudhin Devarachetty11-Apr-06 5:14
memberSudhin Devarachetty11-Apr-06 5:14 
QuestionVS2005? Pin
FinishedOnTime10-Apr-06 8:35
memberFinishedOnTime10-Apr-06 8:35 
AnswerRe: VS2005? Pin
Sudhin Devarachetty11-Apr-06 5:22
memberSudhin Devarachetty11-Apr-06 5:22 
GeneralSource Code Pin
Paul Farry7-Apr-06 18:17
memberPaul Farry7-Apr-06 18:17 
GeneralRe: Source Code Pin
Sudhin Devarachetty8-Apr-06 17:33
memberSudhin Devarachetty8-Apr-06 17:33 
GeneralRe: Source Code Pin
Paul Farry9-Apr-06 12:37
memberPaul Farry9-Apr-06 12:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.161021.1 | Last Updated 7 Apr 2006
Article Copyright 2006 by Sudhin Devarachetty
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid