.NET Tips and Tricks

Blog archive

Free Tools: Data Debugger Visualizer for VS 2005/2008

If you use DataSets and are tired of figuring out what's in your DataSet by asking for Counts of the Rows collection and entering ds.Tables(0).Rows(0)("CustomerId") in the Immediate window, then you need Dan Green's Data Debugger Visualizer. When stepping through your code, you hover your mouse over a DataSet (or DataTable or DataRow) variable and the DataVisualizer's commandbar pops up.

I use DataSets a lot and the Visualizer has saved me endless time in diagnosing problems. The tabbed dialog lets me switch between the schema for the table and a view that shows the data in the rows. I get the row count for any table I choose and can switch between seeing "live" rows or deleted rows. The Row Filter lets me set criteria to limit the rows (useful in large DataSets). For any row, I can quickly see its state (unchanged, deleted, etc.) and, for any field, its original and current values (and any cell errors).

The tool can be downloaded from CodePlex as a Visual Studio 2005 project. Open it, build it, and the appropriate DLL is created and dropped into the right Visual Studio folder. After that, you'll find it waiting for you when you right-mouse click on a DataSet reference. While the tool is free, the author welcomes contributions.

This isn't the only DataSet visualizer out there (you might, for instance, want to check out RightHand's visualizer). Visual Studio 2010 comes with its own DataSet Visualizer, which I'm getting used to, but for old times' sake I recompiled Dan Green's tool into Visual Studio 2010. I had to update the reference to Microsoft.VisualStudio.DebuggerVisualizers. But other than that, the tool worked just like always.

Posted by Peter Vogel on 02/14/2011

comments powered by Disqus


Subscribe on YouTube