VisualizerDevelopmentHost Class

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost

Namespace:  Microsoft.VisualStudio.DebuggerVisualizers
Assembly:  Microsoft.VisualStudio.DebuggerVisualizers (in Microsoft.VisualStudio.DebuggerVisualizers.dll)

Syntax

'Declaration
Public Class VisualizerDevelopmentHost
public class VisualizerDevelopmentHost
public ref class VisualizerDevelopmentHost
type VisualizerDevelopmentHost =  class end
public class VisualizerDevelopmentHost

The VisualizerDevelopmentHost type exposes the following members.

Constructors

  Name Description
Public method VisualizerDevelopmentHost(Object, Type)
Public method VisualizerDevelopmentHost(Object, Type, Type)
Public method VisualizerDevelopmentHost(Object, Type, Type, Boolean)

Top

Properties

  Name Description
Public property DebuggeeObject

Top

Methods

  Name Description
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ShowVisualizer()
Public method ShowVisualizer(Control)
Public method ShowVisualizer(IWin32Window)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

You can use this class to create a harness for testing and debugging a debugger visualizer. Visualizers are small custom applications called from the Visual Studio debugger to display data objects in a manner appropriate to their data type. The VisualizerDevelopmentHost class enables you to run a visualizer for testing and debugging purposes without installing the visualizer into Visual Studio. Using the harness makes debugging a visualizer much easier.

Examples

The following example code creates a visualizer development host and calls the host to show the visualizer. MyDataObject is the data object you want to show in the visualizer. MyVisualizer is the visualizer itself.

public static void TestShowVisualizer(object MyDataObject)
{
   VisualizerDevelopmentHost visualizerHost = new VisualizerDevelopmentHost (MyDataObject, typeof(MyVisualizer);
   visualizerHost.ShowVisualizer();
}

The calling code looks as follows:

String myString = "Hello, World!";  // Create an object to visualize
Visualizer1.TestShowVisualizer(myString);  // Call the host to visualize it

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.DebuggerVisualizers Namespace