Locations of visitors to this page


Onteora Software - Debugging

Onteora Software

Ken Tucker's Blog

About the author

Author Name is someone.
E-mail me Send mail

Recent posts

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Create a VS 2005 Debugging Visualizer

Create a VS 2005 Debugging Visualizer


Visual Studio 2005 visualizers allow you to see the data contained in a variable.  For this example we will create a visualizer to see the value of a guid.  To create a visualizer we need to start with a class library project.  Add a reference to Microsoft.VisualStudio.DebuggerVisualizers and System.Windows.Forms.  Set the build output path in the compile tab of my project to My Documents\Visual Studio 2005\Visualizers. 

.

Imports Microsoft.VisualStudio.DebuggerVisualizers
Imports System.Windows.Forms

<Assembly: DebuggerVisualizer(GetType(GuidVisualizer), target:=GetType(Guid), description:="Guid visualizer")>
Public Class GuidVisualizer
    Inherits DialogDebuggerVisualizer

    Protected Overrides Sub Show(ByVal windowService As Microsoft.VisualStudio.DebuggerVisualizers.IDialogVisualizerService, ByVal objectProvider As Microsoft.VisualStudio.DebuggerVisualizers.IVisualizerObjectProvider)
        Dim g As Guid = CType(objectProvider.GetObject, Guid)
        MessageBox.Show(g.ToString)
    End Sub

End Class

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: VB | Debugging
Posted by Ken Tucker on Wednesday, July 04, 2007 10:12 PM
Permalink | Comments (0) | Post RSSRSS comment feed