Shaykatc's WebLog

VS 2003 Tip #12: Better view of data in the debugger windows

In VS 2003 we did some things in C# to make viewing of data in the debugger easier.

The first problem we had was that if you expanded a type, in the watch window, you would get an unsorted list of members. This was a pain if you were searching for a particular member. So we sorted that to begin with.

The second thing we did was that we made the displays of Hashtables and Arraylists easier - sort of more natural. We made it so that when you expand a Hashtable object in the watch window, you see the key value pairs. For an ArrayList we show you what the elements in the list are. This was a big difference from VS7 where you had to root around in the member nodes to find this information.

Are there other data structures that you use regularly that you believe should be easy to see? Let us know.

Published Monday, April 12, 2004 2:15 PM by shaykatc

Comments

 

Nicholas Paldino [.NET/C# MVP] said:

Shaykat,

How about for DataSets, have it show the tables (the table name, and then the table object itself), then then when you drill down to a table, you get the rows in the table. If you open up the row in the table, you get the column values, like a key value pair for a hashtable.

- Nick
April 12, 2004 2:17 PM
 

Shaykat said:

Yep, we know this is a pain point for customers, and we're thinking of a solution for this in the future...
April 12, 2004 2:19 PM
 

Kevin Dente said:

Better handling of really long strings would be nice.
April 12, 2004 3:31 PM
 

shaykatc said:

Good point about the strings, definitely something we are thinking about improving in the future. Actually you should be able to see a little drop down box in tech preview bits of Whidbey that allows you to use a new viewer to see large strings.
April 12, 2004 3:41 PM
 

Kevin Dente said:

I just checked it out. Very nice. Any plans to allow editing in the string debug viewer?
April 12, 2004 4:16 PM
 

shaykatc said:

Editing the string viewer is something we are looking into.
April 12, 2004 4:32 PM
 

Steve Hiner said:

For really complex data you could provide separate dialogs to handle it. I certainly second the motion that DataSets should be more easily viewed during debuggin but it seems like the locals window is too small. What if you could right-click a DataSet and select "View in separate window" or something that would bring it up in a grid?

I'd also like to see that for 2D arrays and jagged arrays. Quite often I want to compare values between rows in an array but with the current method it's hard to get a grasp of the variation between rows.

My pie-in-the-sky idea - one that I've considered writing as an add-in just to have it...
Graph/chart view of arrays that updates live as you step through the code. When doing heavy mathematic work it would be excelent to be able to view a grid or line chart of the data. Obviously it would have to be fairly simple graphing to be accesible but even simple graphs are better than none at all.
April 12, 2004 6:49 PM
 

JD said:

I agree with others who suggest that debugging DataSets can be a real pain. For me, it leads to two questions:

1. Is this something that will be resolved by the "visualizations" in VS.NET 2005?

2. Is it possible with 2003 to hack together a generic dataset "viewer" (as an add-in or something along those lines) that can be used during debugging? Currently, I just use WriteXml() to send the data out to a file that can be examined in XmlSpy.
April 13, 2004 10:07 AM
 

Shaykat said:

Actually, the dataset solution is something we are looking to solve with visualizers in Whidbey.
Yes it is possible to do what you mention with an add in. I saw an example somewhere - I'll try to find it.
April 13, 2004 2:40 PM
 

Shaykat said:

Steve- you should check out the Whidbey beta - what you suggest for the dataset is basically where we are going. Your other ideas are great - in Whidbey you should be able to use the concept of visualizers to implement them.
April 13, 2004 2:42 PM
 

Scott Nonnenberg said:

I'm feeling the need to shamelessly promote here. :0) I'm a PM on the Debugger team - this topic is very much my area. in VS2005, visualizers will be able to solve the dataset and long string problem. Second, if you want a string visualizer you can use to edit the string, write it yourself! We are thinking about adding this capability to our built-in visualizer, but you very much have the ability to do this using the extensible framework. I have a how-to up on my blog right now...
April 19, 2004 1:35 PM
New Comments to this post are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker