What class is used for the "Text visualizer"?

When I use the DebuggerVisualizer attribute as follows

FROM#

 [assembly: DebuggerVisualizer(typeof(DataSetVisualizer), typeof(DataSetVisualizerSource), Target = typeof(DataTable), Description = "My DataTable Visualizer")] 

vb.net

 <Assembly: DebuggerVisualizer(GetType(DataSetVisualizer), GetType(DataSetVisualizerSource), Target := GetType(DataTable), Description := "My DataTable Visualizer")> 

I can reuse Dataset Visualiser in dll visualisers. This allows you to create the built-in VS visualizer as the first (by default), even if a custom DataTable visualizer is defined ( How to specify the order of debugger visualizers in Visual Studio ).

I would like to achieve the same behavior for the Text renderer.

+7
c # visual-studio visual-studio-2012 debuggervisualizer
Sep 20 '13 at 8:23
source share
1 answer

Unfortunately, I do not believe that there is a managed class for Text Visualizer, at least in relation to the documented VS API for using debugger visualizers. If a specific class exists for Text Visualizer, I could not find it, reflecting the managed assemblies associated with debugging.

The documentation for creating a custom visualizer states that a custom visualizer inherits from DialogDebuggerVisualizer . But if you flip Microsoft.VisualStudio.DebuggerVisualizers.dll, you will see that the only visualizer that comes with VS implemented through this process is the DataSetVisualizer class (I use VS2012, but their documentation from VS2008 on indicates the same process as and DialogDebuggerVisualizer), Therefore, there will be no proper class name that you can use with the DebuggerVisualizerAttribute attribute. Here is a reflection snapshot from DotPeek :

DotPeek reflection of Microsoft.VisualStudio.DebuggerVisualizers.dll

It is more likely that other visualizers are not code driven or may be dynamic constructs that can be used in all managed and unmanaged code (in the worst case, they are legacy transporters from much earlier versions of Visual Studio).

+1
Nov 18 '13 at 18:14
source share



All Articles