string value in watch window
-
I have a structure like struct Id { LPCSTR sId; /* note that this is the first member */ unsigned nId; }; I'd LOVE to have vc-debugger to display the sId value (in place of {...}) in the watch/this/locals/auto window, like CString does. I've looked through the sources for CString and haven't quite figured it out. Deriving from string isn't an option. Any suggestions?
-
I have a structure like struct Id { LPCSTR sId; /* note that this is the first member */ unsigned nId; }; I'd LOVE to have vc-debugger to display the sId value (in place of {...}) in the watch/this/locals/auto window, like CString does. I've looked through the sources for CString and haven't quite figured it out. Deriving from string isn't an option. Any suggestions?
Locate the file autoexp.dat - mine (Visual Studio 6) is in the MSDev98\bin directory. This file contains details of the expansions used when debugging. Open this up, and there is a huge bit at the top telling you how to do your own stuff. Further down you can see the entry for CString. Hope this helps!
-
I have a structure like struct Id { LPCSTR sId; /* note that this is the first member */ unsigned nId; }; I'd LOVE to have vc-debugger to display the sId value (in place of {...}) in the watch/this/locals/auto window, like CString does. I've looked through the sources for CString and haven't quite figured it out. Deriving from string isn't an option. Any suggestions?
Are you saying that when you view Id.sId in the watch window, it shows ellipses instead of the actual data? If you do not know about the autoexp.dat file, and thus have never altered it, then I'm unclear on your question. By default, the contents of the address pointed to by Id.sId are displayed. If you had just Id in the watch window, it would indeed show up as {...}.
-
Are you saying that when you view Id.sId in the watch window, it shows ellipses instead of the actual data? If you do not know about the autoexp.dat file, and thus have never altered it, then I'm unclear on your question. By default, the contents of the address pointed to by Id.sId are displayed. If you had just Id in the watch window, it would indeed show up as {...}.
thanks a lot. I didn't know of autoexp.dat, but have always suspected something like it. Thank you very much for telling me of it. (Thought it was built into vstudio. -darn M$)