Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/171849

From BetaArchive Wiki

Article ID: 171849

Article Last Modified on 10/17/2003


  • The Integrated Debugger, when used with:
    • Microsoft Visual Studio 97 Service Pack 3

This article was previously published under Q171849


The debugger hangs when an STL object with very long symbol name is viewed in the Watch Window and expanded. You have to close Developer Studio Task Manager and restart. The sample program in the MORE INFORMATION section demonstrates this behavior.


This behavior occurs because the debugger currently has a limit of 255 characters for symbols.


Reduce the size of the mangled symbol names. You can do this by shortening the names of classes and class members. You can also shorten class names of classes by using #define.


Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been fixed in Visual Studio 97 Service Pack 2.

For more information on the Visual Studio 97 Service Pack 2, please see the following article in the Microsoft Knowledge Base:

170365 INFO: Visual Studio 97 Service Packs - What, Where, and Why


Steps to Reproduce Behavior

Build the following sample code as a Console application:

   #include <windows.h>
   #include <map>
   #pragma warning (disable : 4786 )
   using namespace std;
   template<typename Type>
   class SomeReallyLongSymbolName
         SomeReallyLongSymbolName(Type var){m_Type = var;}
         void func(Type var){m_Type = var;}
         Type m_Type;
   SomeReallyLongSymbolName<int> intObject(0);
   typedef map< DWORD, SomeReallyLongSymbolName< DWORD> >
   STLTypeWithLongName ;
   STLTypeWithLongName  STLObjectWithLongName;
   int main()
      return 0;

After the build is complete, start the debugger by pressing the F10 key. In the Watch Window, enter the two variable names, intObject and STLObjectWithLongName. You will be able to expand the intObject variable. However, when you try to expand the STLObjectWithLongName variable, the Debugger will hang.

Keywords: kbbug kbfix kbvs97sp2fix KB171849