Displaying User Defined Types

Customized Type Display

You can customize how Visual C++ displays classes in the variable view. By default VC++ displays "{...}" and you need to click the small '+' icon to expand the members. You can change this behaviour, and make Visual C++ display whatever data member you want, in whatever order and in whatever format you like.

You need to locate a file called AUTOEXP.DAT in your Visual C++ installation. By default it will be:

  • VC++ 6.0:
    • C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\AUTOEXP.DAT

  • VC++ 9.0:
    • C:\Program Files\Microsoft Visual Studio 9.0\Common7\Packages\Debugger\autoexp.dat

After you have made the changes and saved the file, you will need to restart Visual C++ for the changes to take effect.

For a more in depth look at this option, and it's extensive range of uses, please refere to the folowing document: Customize autoexp.dat for own types in VS2005 . The page mentions the contents is aimed at Visual Studio 2005, but, having tested it, I've found that it works in both Visual Studio 2008 and 2010 Beta.