Click here to Skip to main content
13,346,708 members (67,269 online)
Click here to Skip to main content
Articles » Languages » VB.NET » HowTo » Downloads


53 bookmarked
Posted 22 Jan 2008

Authoring Visual Studio Debugger Visualizers

, 26 Jan 2008
An article on developing and debugging Visual Studio Debugger Visualizers.
Imports Microsoft.VisualStudio.DebuggerVisualizers

Public Class frmStringVisualizer

#Region " Declarations "

    Private _objObjectProvider As _

#End Region

#Region " Properties "

    Public Property ObjectProvider() As _
            Return _objObjectProvider
        End Get
        Set(ByVal Value As IVisualizerObjectProvider)
            _objObjectProvider = Value
        End Set
    End Property

    Public Property StringToVisualize() As String
            Return Me.txtString.Text
        End Get
        Set(ByVal Value As String)
            Me.txtString.Text = Value
        End Set
    End Property

#End Region

#Region " Methods "

    Private Sub btnClose_Click(ByVal sender As _
        System.Object, ByVal e As System.EventArgs) _
        Handles btnClose.Click

    End Sub

    Private Sub btnReplaceText_Click(ByVal sender As _
        System.Object, ByVal e As System.EventArgs) _
        Handles btnReplaceText.Click
        'There are two ways to replace data.  Take your choice.
        '1.  use the ReplaceData Method
        Using ms As New System.IO.MemoryStream
            StringVisualizerObjectSource.Serialize( _
                ms, Me.StringToVisualize)
        End Using
        '2.  use the ReplaceObject Method

    End Sub

    Private Sub frmStringVisualizer_Load(ByVal sender _
        As System.Object, ByVal e As _
        System.EventArgs) Handles MyBase.Load
        Me.btnReplaceText.Enabled = _

        If Me.btnReplaceText.Enabled Then
            Me.ToolTip1.SetToolTip(Me.btnReplaceText, _
                "Click to replace the original text with what you " _
                & _
                "have entered in the above textbox.")

            Me.ToolTip1.SetToolTip(Me.btnReplaceText, _
                "The source object does not support replacement.")
        End If

    End Sub

    Private Sub txtString_TextChanged(ByVal sender As _
        Object, ByVal e As System.EventArgs) Handles _
        Me.lblStringLength.Text = String.Format( _
            "{0} characters", _

    End Sub

#End Region

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Karl Shifflett
Architect Infragistics
United States United States

I’m a passionate Platform Architect at Infragistics.

I’m a long-time WPF-Prism fanatic who enjoys writing developer tools and line of business applications.

My current front end passions are: XAML platforms (Xamarin.Forms, Xamarin, UWP, and WPF), Electron, ES2015 (ES6), Node.js, Aurelia, and AngularJS (Angular 1.5.x).

For the back end I use what is appropriate for the project: SQL Server and ASP.NET WebAPI, MongoDB, Express, Azure, Firebase, etc.

I am very pragmatic software engineer and strive to write simple, maintainable, and testable code. Simple code allows for solving complex problems in a maintainable way.

My Blog

My Github Repros

My YouTube Videos

Just a grain of sand on the worlds beaches.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.180111.1 | Last Updated 26 Jan 2008
Article Copyright 2008 by Karl Shifflett
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid