I'm wanting to get the full value of a char[] variable in the VC6 watch window, but it only shows a truncated version. I can copy the value from a debug memory window, but that contains mixed lines of hex and string values. Surely there is a better way??
Have you looked into modifying the autoexp.dat file? You may be able to tweak some values in there. For more information:
Push come to shove you can put in the watch
given
char bigArray[1000];
watch:
&bigArray[0]
&bigArray[100]
&bigArray[200]
...
or change the index for where in the string you want to look...
Its clunky, but its worked for me in the past.
I do not have VC6 any more, so I cannot try it. I do not know if it works, but maybe you can enter
(char*)textArray;
in the watch window.
The bettter solution maybe: VS2008 automatically displays the text the way you want. And there is a Express Edition for VS2008 free of change, which can, as far as I know, be used to develop commerecial applications. You can even try to continue developing with VC6, and use VS2008 for debugging only. With VS2003 it was possible. About 5 year ago I had to maintain an app which was developed with VC6. I kept using VC6 for developing, but for debugging I used VS2003.
For large strings, you're pretty much stuck with the memory window - the tooltip would truncate eventually.
Fortunately, the memory window is easy to get data from - I tend to show it in 8-byte chunks so its easy to manage, find your string data and cut&paste the lot into a blank window, then use alt+drag to select columns and delete the hex values. Then start at the bottom of the string and continually page up/delete (the newline) to build your string (I use a macro for that bit).
I don't think there's any better way once you get long strings.