Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Debug with dynamic array and STL container
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

speedfirst
Junior Member

14 Posts

Posted - Jun 19 2006 :  04:06:42 AM  Show Profile  Reply with Quote
Time and time again, I program with dynamic arrays starts with a pointer:
int * pArray = new int[ArrayCount];
However, VS, even 2005 edition does not support to show the dynamic array's content in its Watch and Auto window of debug mode. If I put the "pArray" into Watch window, only the first element of this array can be shown, which is not so easy for me to get the idea what are in the array now. The awkward alternative way I am using is to use Memory window. Another method is use Excel's auto sequnce fill function to get a list pArray[0] pArray[1]...., and copy them into Watch window.

When I use STL container, there is a similar problem. If you define:
vector<MyClass> a;
and put a into Watch window, only some confusing iterator (for example, _being and _end) are shown and I cannot get more detailed information about this vector.

But when I use Eclipse, I find that a container can be shown in its "Expression" window in two modes. The first one is normal mode, in which the container's fields, such as begin, end, element_count, capacity, can be seen. Another one is logical mode, in which all the contents of the container's appear (and grouped as 0...99, 100...199, ...)
That's fantastic and makes everything more convenient.

So how about if VAX can add this function? Thank you.

Speedfirst

bugfix
Tomato Guru

Germany
324 Posts

Posted - Jun 19 2006 :  04:25:00 AM  Show Profile  Reply with Quote
quote:
Originally posted by speedfirst

Time and time again, I program with dynamic arrays starts with a pointer:
int * pArray = new int[ArrayCount];
However, VS, even 2005 edition does not support to show the dynamic array's content in its Watch and Auto window of debug mode. If I put the "pArray" into Watch window, only the first element of this array can be shown, which is not so easy for me to get the idea what are in the array now. The awkward alternative way I am using is to use Memory window. Another method is use Excel's auto sequnce fill function to get a list pArray[0] pArray[1]...., and copy them into Watch window.


just type e.g. "pArray, 10" in watch window to show first 10 values
quote:

When I use STL container, there is a similar problem. If you define:
vector<MyClass> a;
and put a into Watch window, only some confusing iterator (for example, _being and _end) are shown and I cannot get more detailed information about this vector.
VAX can add this function? Thank you.


check docs on autoexp.dat

-bugfix

http://www.mf-sd.de
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000