Debugger Visualizer Changes in Beta2

Some of the syntax for writing debugger visualizers has changed again with the recent Beta 2 of VS2005. They are minor, but as always, notable.

1) The VisualizerUIType is gone because all Visualizers are Modal.

Before
[assembly: DebuggerVisualizer(typeof(DebuggerVisualizers.DataTableDebugger),VisualizerUIType.Modal, Target = typeof(System.Data.DataTable), Description = “JL DataTable”)]

Beta2
[assembly: DebuggerVisualizer(typeof(DebuggerVisualizers.DataTableDebugger),Target = typeof(System.Data.DataTable), Description = “JL DataTable”)]

2) Rather than implementing the System.Diagnostics.IDebugVisualizer interface, you now will implement the Microsoft.VisualStudio.DebuggerVisualizers.DialogDebuggerVisualizer class 

Before
public class DataTableDebugger : IDebugVisualizer

Beta2
public class DataTableDebugger : DialogDebuggerVisualizer

The signature of the show method has changed as well. It now uses interfaces from the Microsoft.VisualStudio.DebuggerVisualizers namespace and no longer requires a uiType, since that is a given.

Before
public void Show(IServiceProvider windowService, IVisualizerObjectProvider objectProvider, VisualizerUIType uiType)

Beta2
public void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)

Note that in addition to using the System.Diagnostics namespace (which gives us the DebuggerVisualizer class referenced in the assembly attribute, I am also using the Microsoft.VisualStudio.DebuggerVisualizers namespace as well.

http://www.AcehAid.org

  Sign up for my newsletter so you don't miss my conference & Pluralsight course announcements!  

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

This site uses Akismet to reduce spam. Learn how your comment data is processed.