共用方式為


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.

Comments

  • Anonymous
    April 12, 2004
    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
  • Anonymous
    April 12, 2004
    Yep, we know this is a pain point for customers, and we're thinking of a solution for this in the future...
  • Anonymous
    April 12, 2004
    Better handling of really long strings would be nice.
  • Anonymous
    April 12, 2004
    The comment has been removed
  • Anonymous
    April 12, 2004
    I just checked it out. Very nice. Any plans to allow editing in the string debug viewer?
  • Anonymous
    April 12, 2004
    Editing the string viewer is something we are looking into.
  • Anonymous
    April 12, 2004
    The comment has been removed
  • Anonymous
    April 13, 2004
    The comment has been removed
  • Anonymous
    April 13, 2004
    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.
  • Anonymous
    April 13, 2004
    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.
  • Anonymous
    April 19, 2004
    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...