Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am handling a large array of a certain struct and wish to see the values in the array
I can see all the entries in the watch window but if i want to see the fields of each entry in the array i need to expand it manually.
Is there a way to expand all the entries of the array in the watch window at once and
not clicking on every one?
(The opposite function of collapse to parent exists)

Thanks

dj4400

What I have tried:

i Tried to google it but didnt find an answer that addresses an array on the stack
Posted
Updated 20-May-20 7:09am

No, there isn't. At least not by using the default visualizer.

You may want to look into writing your own visualizer for an array type. But be warned. Creating a view of an entire array of expanded objects can take a LOT of time.

Google: visual studio custom debug visualizer[^]
 
Share this answer
 
Solution 1 is correct but you may also write some specialized function with the TRACE macro to print interesting values. Sometimes some checking makes sense for only printing the special cases.

Another option can be to create some sorted or filtered array with your criterias which is easier to debug or even speeds up your program.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900