STL Visualizers on GitHub

Anju Del Moral Gonzalez

We are happy to announce that now it’s possible to contribute to the STL Visualizers for Visual Studio’s debugger on GitHub.

A visualizer is a file with .natvis extension that allows you to manipulate the way native types appear in the debugger’s watch window. 

A visualisation for vectors of ints

We’ve been working on fixing existing issues with the visualizers and augmenting them, but with C++20 coming with new types, they have been falling behind. We decided to open source them so that the community can benefit and collaborate.


What’s Available?  

The file is now in the GitHub repo under stl\debugger\STL.natvis. We also have available documentation for the .natvis file format here. All changes made on GitHub will be ported to Visual Studio. 

This has been up already for a couple of weeks and we are happy to see that there are already contributors helping in this new area. We would like to thank AdamBucior, statementreply, SuperWig and joemmett. Some of the PRs add visualizers to coroutines, chrono, ranges, the spaceship operator, source location, span, and more.   

   Visualisation of various chrono types


Contribute now! 

We are happy with the results of this change, and we would like to see more. After you make changes to the visualizer you can test them by adding the natvis file to any Visual Studio C++ project by right clicking your project, selecting Add > Existing Item, and choosing the STL.natvis file. After doing this you should be able to see your changes in a Visual Studio debugging session.  

Selecting the STL.natvis file