Anyway to view the content of a dataset or datatable in debug? I don't mean looking up a specific element of the dataset but to view the hole thing.
4 Answers
Yes. Just use the DataSet Visualizer. See this MSDN article about how to use DataTips.

- 59,486
- 16
- 97
- 135
When you're in Debug stepping through code, just hover over the DataSet and click on the little magnifying glass that is there to open the visualizer.

- 3,575
- 2
- 23
- 33
-
I don't get the visualizer and what I do get does not give a view of the data of all the rows. – Alex Jan 29 '10 at 19:46
I've found the RightHand dataset visualiser particulary useful on many occasions, particulary when debugging constraint errors as it will show you what constraint has been broken and which rows are in error - something the built in visualiser doesn't do as well showing what rows have been added/changed/deleted.

- 2,269
- 17
- 29
If you have a particularly large and complex dataset where 'hovering' wouldn't be practical, you can also use the command window. To print values from a dataset, you could use something like the following:
? dsMyDataSet.Tables("NameOfTable").Rows(1).Item("NameOfColumn")
...which would return the value of the named column in the second row (0-based) of the named table in the dataset.
or
? dsMyDataSet.Tables(0).Rows(0).Item(0)
...which would return the value of the first column of the first row of the first table in the dataset.

- 892
- 4
- 16
- 41
-
>>I don't mean looking up a specific element of the dataset but to view the hole thing. – Alex Jan 29 '10 at 18:04