Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to visualize a DataTable while debugging?

I have some very big DataTables, which I need to see their content while debugging.
Is there a better way to do that other than opening the Columns' and rows' lists Properties in the Watch panel?

Thanks.

like image 601
Oren A Avatar asked Oct 28 '10 14:10

Oren A


People also ask

How do I view a DataTable while debugging?

set the break point on the dataset/datatable(f9 shortcut key for break point) and run your application (f5 is the shortcutkey ) When the break point comes mouse hover the dataset/datatable click on the glass shown in the hover image in visual studio . Note : check compilation debug="true" is true in web config .

How to debug DataTable?

This can be done by clicking and dragging the button to your browser's bookmark bar, or right clicking on the button an selecting "Add to bookmark. Then load the web-page with the DataTable you wish to debug and select the bookmarklet from your bookmark bar.

How do I view a DataTable?

You can access the contents of a DataTable by using the Rows and Columns collections of the DataTable. You can also use the Select method to return subsets of the data in a DataTable according to criteria including search criteria, sort order, and row state.


2 Answers

Use the DataTable visualizer; hold your mouse over the variable and click on the magnifying glass this will open the DataTable visualizer.

Btw, there are more VS2010 visualizers for other actions. I really like the WPF Tree visualizer: hold your mouse on a WPF control and click the magnifying glass ;-)

like image 93
Zenuka Avatar answered Oct 22 '22 02:10

Zenuka


Open the DataSet visualizer. Either hover over the variable in the source code or look at one of the variables in a debugger window (Locals, Auto, etc.) Then click the magnifying glass.

MSDN article on How to Use a Visualizer.

like image 21
Paul Williams Avatar answered Oct 22 '22 01:10

Paul Williams