Monday, May 30, 2005

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
Monday, May 30, 2005 9:38:56 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview