Is there a way to customize the tool tip of a custom object in the VS Debugger?

c#, debugging, visual-studio

Solution

Yeah, check out the MSDN article Enhancing Debugging with the Debugger Display Attributes, which offers:

- `DebuggerDisplayAttribute` - Calculate a string to display

- `DebuggerBrowsableAttribute` - Indicate which members should be shown

- `DebuggerTypeProxyAttribute` - Indicate a separate type that provides data to be shown.

Problem

Say you have a custom class call it Foo. When you then have an instance of this class, during debugging, if you mouse over this object, you'll either see the fully qualified namespace name of the type, or if you override ToString in this class, you'll see that. Is there any way to customize what the tool tip will say?

Original source