I know it's 21st century. Java and .NET rule the world. But one day you might got stuck with a piece of legacy code C++ code written in Visual Studio 6.0. And sometimes you end up debugging it in its native environment because converting the code to modern versions of runtime is too complex.

In this case you will be disappointed by VC6 abilities to watch contents of C++ strings (std::basic_string, MFC/WTL CString, BSTR, _bstr_t, CComBSTR, char*, WCHAR*). Most probably you'll have to either dump strings to a log file or print to a console of some kind.

But there's a wonderful plugin for Visual Studio 6 called XDebug. It was written by Eugene Ivakhiv. The plugin completely reinvents viewing of string variables' contents in VC6. You can find it here - http://www.codeguru.com/cpp/v-s/devstudio_macros/debugging/print.php/c5989/.

0 comments