Search code examples
visual-studiodebuggingvisual-studio-debuggingdebuggervisualizer

What visualizer is currently used


On the internet (Microsoft website, e.g.), there's plenty of information on how to create a visualizer.
However, I'd just like to know, which visualizer is currently used by my debugger?

For Native code, that question is very simple:

  • Menu "Tools", "Options", "Debugging", "Output window", "General Output Settings", "Natvis diagnostic messages", set to "Verbose".
  • In the Watch-window, enter .natvisreload
  • Verify the "output" window: all native visualisers are mentioned.

However, now I'm working with managed code, and in my watch-window, I see entries like:

  • {User Info: 12 User(s), 6 Group(s)
  • {VDX File Change Info (117 files)}

Those entries give me the impression that for this managed code, a/some visualiser(s) is/are used, and I'd like to customise, expand or modify it/them, but therefore I need to know where it/they is/are (sorry for the bad sentence, I just want to emphasize that I have no clue of the whereabouts of the visualiser(s)).

How can I know which managed visualizers are used in my Visual Studio session?

Thanks in advance
Dominique


Solution

  • You'd have to integrate with the debugger and see what types are being evaluated in the watch/autos/locals windows.

    From there you can find those types in the list of modules loaded (using debugger apis) and then search for the attributes that Leo mentioned.

    There's no debug output anywhere about which type visualizers are loading for managed code. It's actually stored on the types themselves.