

- OBJECT VISUALIZER PROGRAM HOW TO
- OBJECT VISUALIZER PROGRAM FOR MAC
- OBJECT VISUALIZER PROGRAM INSTALL
- OBJECT VISUALIZER PROGRAM CODE
- OBJECT VISUALIZER PROGRAM SERIES
Make sure to take a look at the other posts in my Debugger Visualizer series. Use the same visualizers as Visual Studio for Windows.
OBJECT VISUALIZER PROGRAM FOR MAC
Visual Studio for Mac uses the Mono Soft-Mode debugger, which does not Native VisualCpp assemblies won't use them. The visualizers described in this post only work for managed code.

The built-in string visualizers (Text, HTML, XML, JSON). Universal Windows Platform (UWP) apps and Windows "Store" apps do not support custom visualizers, though they can use So without a lot of crazy reflection, you have no way of knowing the types used in the generic placeholders. But in the visualizer, you only get an object, (ex: Dictionary) but not a constructed type (ex: Dictionary). You can only register a visualizer with an open generic type So Don't Be Stupid and pay a little extra attention to which visualizers you see vs. But, in my experience, very few of us make use of anything but full-trust environments. Visual Studio already has some safeguards in place, such as disallowing app-side VisualizerObjectSource object running in partial-trust. And since visualizers can been shipped with libraries you're using, they may be available without you having directly installed anything. So make sure you know and trust the source for any visualizers you choose to run.
OBJECT VISUALIZER PROGRAM CODE
So that means the visualizer you select could happily go off and delete your entire hard drive, send all of your source code to an FTP site, or whatever Hollywood-style hacker-in-a-hoodie nefarious stuff you can imagine. Keep in mind that parts of the Debugger Visualizer effectively run with the security level of Visual Studio, and all too many of us developers run Visual Studio as Administrator (thanks, in large part, to the crazy that is IIS's security model).
OBJECT VISUALIZER PROGRAM INSTALL
You can find a number of visualizers in the Visual Studio Marketplace, and they'll install into one of these locations. Note: The visualizers must be installed on the machine running the application being debugged, so if you're usingĪ remote debugging session, they must be installed on the remote machine as well as your local machine.

(Though, including visualizers in theĪssembly with the types they visualize would work via NuGet) This, however, makes it pretty difficult to include standalone visualizers in NuGet packages. force loading of the visualizer assembly and One way to do that is add a static constructor to your main class that referencesĪ type from the visualizer assembly, like this: class Program

You may need to force the assembly to be loaded. But if you use the string-based constructor for the attribute (ex: ), If you use the actual type in the DebuggerVisualizer attribute (ex: ), If the visualizers are in a seperate assembly (not part of the current solution) which you reference, you may need toįorce the assembly to be loaded. If the visualizers are included in projects in the currently loaded solution, typically everything "just works". That is, the DebuggerVisualizerĪttribute must have been loaded and the assembly housing the visualizer must be loaded (otherwise you'll get an error messageįrom Visual Studio saying it couldn't find the assembly). Visualizers registered in assemblies currently loaded into the application will be available. Loading Visualizers (and Where To Install)
OBJECT VISUALIZER PROGRAM SERIES
You can find code samples to go along with this series in my DebugVisualizer GitHub repository. I've also given a talk on this topic: Putting the Visual into the Visual Studio Debugger. Installation, Limitations, and Security Considerations for Your Custom Debugger Visualizer for Visual Studio.Modifying The Live Object in Your Custom Debugger Visualizer for Visual Studio.Writing A Custom Debugger Visualizer using WPF for the UI.Writing A Custom Debugger Visualizer for Non-Serializable Types or More Complex Objects.Writing A (ReadOnly) Custom Debugger Visualizer for Visual Studio.
OBJECT VISUALIZER PROGRAM HOW TO
This posting is part of a series detailing how to write a custom Debugger Visualizer for Visual Studio.
