Natvis VC++ Debugger Visualization File
4.0 | 2 Votes
What is a NATVIS file?
A NATVIS file is a debugger visualization file used by Microsoft Visual Studio, a software development tool used to create Windows programs and web applications. It contains one or more Type elements, or visualization rules, in XML format. NATVIS files are part of the Visual Studio Natvis framework that enables developers to define how native types are displayed in debugger windows, such as "Locals" in the Visual Studio debugger.
You can find NATVIS files for common types that come with Visual Studio in the following path:
You can open and edit NATVIS files in Visual Studio. After changing the file and saving it, the modifications will be reflected in the "Watch," "Locals," etc. debugger windows. You can also open and modify NATVIS files with a different program than Visual Studio but the modifications will not be automatically reflected. You need to use the .natvisreload command in the "Watch" window or restart the debugging session. NATVIS files may be defined per-project, -user, or -system or embedded in .PDB files.
You can add a NATVIS file to a C++ project by selecting the project node in the "Solution Explorer" then clicking Add → New item → Visual C++ → Utility → Debugger visualization file (.natvis).
NOTE: The NATVIS file was introduced to replace the autoexp.dat file, which was previously used by earlier versions of Visual Studio.