This documentation is archived and is not being maintained.

Displaying Custom Data Types

You can customize the way Visual Studio displays data types in debugger variable windows.

Visual Basic and C#

For C#, you can add expansions for custom data using DebuggerTypeProxyAttribute, DebuggerDisplayAttribute, and DebuggerBrowsableAttribute. Visual Basic supports the DebuggerDisplay attribute but not the DebuggerBrowsable attribute.

Visualizers

You can write a visualizer to display any managed data type. For more information, see How to: Write a Visualizer.

Native Code

For native code, you can add custom data type expansions to the file autoexp.dat, which is located in the Program Files\Microsoft Visual Studio 8\Common7\Packages\Debugger directory. Instructions on how to write autoexp rules are located in the file itself.

Caution noteCaution

The structure of this file and the syntax of autoexp rules may change from one release of Visual Studio to the next.

Native type views can also be customized by writing an expression evaluator add-in. For more information, see EEAddIn Sample: Debugging Expression Evaluator Add-In.

See Also

Show: