Anyname Donotcare
Anyname Donotcare

Reputation: 11423

Is there some debug tools to show the result in a flat table

I want to ask if there 's some debug tools to show the result in a flat table to facilitate finding any logical errors .

For Example ::

enter image description here

Now I want to see all these rows in a flat table instead of each one through the debugger .

Is there any tool like LINQPad for example for this purpose ?

Upvotes: 3

Views: 242

Answers (3)

Tim Schmelter
Tim Schmelter

Reputation: 460238

The debugger of Visual Studio has already a builtin DataTable visualizer. Just click on the loupe-symbol and you can inspect it as table.

If you don't analyze a DataTable but a DataRowCollection(as in your screen shot), you can use this in the quick-watch-window of the debugger:

rows.Cast<DataRow>().CopyToDataTable()

After you have executed it there, you're able to click on the loupe to inspect the table. That works also with a Linq query or a Rows property of a DataTable.

Dataset Visualizer Dialog Box

Upvotes: 2

tomfanning
tomfanning

Reputation: 9670

I am not aware of an existing tool to show a DataRowCollection in a table form - but generally, these types of tools are called Visualizers. Here is the MSDN page on them - including a link on how to build your own. It's really very straightforward.

Upvotes: 1

TomTom
TomTom

Reputation: 62157

No, there is not (none that I know of) but you can actually write your own debugging extension. It is not that hard.

THe main problem here is more the use of a DataTable, which is slow, a memory hog and in general worse than real ojects.

Upvotes: -1

Related Questions