You can write a custom visualizer for an object of any managed class except for Object or Array.

The architecture of a debugger visualizer has two parts:

The debugger side runs within the Visual Studio debugger. The debugger-side code creates and displays the user interface for your visualizer.

The debuggee side runs within the process Visual Studio is debugging (the debuggee).

The data object that you want to visualize (a String object, for example) exists in the debuggee-process. So, the debuggee side has to send that data object to the debugger side, which can then display it using a user interface you create.

The debugger side receives this data object to be visualized from an object provider that implements the IVisualizerObjectProvider interface. The debuggee side sends the data object through the object source, which is derived from VisualizerObjectSource. The object provider can also send data back to the object source, which enables you to write a visualizer that edits, as well as displays, data. The object provider can be overridden to talk to the expression evaluator and, therefore, to the object source

The debuggee side and debugger side communicate with one another through Stream. Methods are provided to serialize a data object into a Stream and deserialize the Stream back into a data object.

Support for generic types is limited. You can write a visualizer for a target that is a generic type only if the generic type is an open type. This restriction is the same as the restriction when using the DebuggerTypeProxy attribute. For details, see Using DebuggerTypeProxy Attribute.