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
Beforepublic class DataTableDebugger : IDebugVisualizer
Beta2public 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.
Beforepublic void Show(IServiceProvider windowService, IVisualizerObjectProvider objectProvider, VisualizerUIType uiType)
Beta2public 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.
Remember Me
See my speaking schedule for more events
User Group Leader
Hosted by:
Powered by: newtelligence dasBlog 2.0.7226.0
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2008, Julie Lerman
E-mail