Click to Rate and Give Feedback
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
 
VisualizerDevelopmentHost Class 

Namespace: Microsoft.VisualStudio.DebuggerVisualizers
Assembly: Microsoft.VisualStudio.DebuggerVisualizers (in microsoft.visualstudio.debuggervisualizers.dll)

Visual Basic (Declaration)
Public Class VisualizerDevelopmentHost
Visual Basic (Usage)
Dim instance As VisualizerDevelopmentHost
C#
public class VisualizerDevelopmentHost
C++
public ref class VisualizerDevelopmentHost
J#
public class VisualizerDevelopmentHost
JScript
public class VisualizerDevelopmentHost

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.

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
System.Object
  Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker