IVisualizerObjectProvider Interface


Provides object data from the debugee to the visualizer.

public interface class IVisualizerObjectProvider
public interface class IVisualizerObjectProvider
__interface IVisualizerObjectProvider
public interface IVisualizerObjectProvider
type IVisualizerObjectProvider = interface
Public Interface IVisualizerObjectProvider


public class DebuggerSide : DialogDebuggerVisualizer  
    override protected void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
    // . . . Other methods omitted for clarity.  


A visualizer is a small program the Visual Studio debugger uses to display (visualize) an object of a specific data type in meaningful manner. To visualize an object, a visualizer uses code that runs in the debugger process (the debugger side) and code in the process being debugged (the debuggee side).

The debugger side and debuggee side communicate with each other by using VisualizerObjectSource and IVisualizerObjectProvider.

The debuggee side uses VisualizerObjectSource to specify a VisualizerObjectSource object for the debugger side. The debugger side requests and receives this information by calling methods on the IVisualizerObjectProvider interface.

A visualizer can edit, as well as display, data. If your visualizer supports editing data, you must replace the data entirely by calling ReplaceData(Stream) or ReplaceObject(Object) or transfer data back to the debuggee using TransferData(Stream) or TransferObject(Object). If you want to save data back, you also need to create your own object source.



Specifies if the debuggee supports the BinaryFormatter since it was deprecated in .NET 5. If it does not, the provider most use JSON to communicate with the visualizer.


Specifies whether a replacement object can be created. That is, determines whether the data object being visualized is replaceable (read/write) or nonreplaceable (read only).



Gets an initial blob of data about the object being debugged. The data is written into the provided MemoryStream.


Gets the data using GetData and then deserializes assuming that defualt serialization has been done


Creates a replacement copy of the object based on the serialized data given.


Serializes the object using default serialization and then sets the data using ReplaceData


Transfers the data biderectionally to the TransferData method on the VisualizerObjectSource


Serializes the outgoing object using default serialization and then calls TransferData. Upon return deserializes the incoming data and returns the deserialized object

Applies to