title: Using .natvis file to visualise C++ objects in VS Code
body: <p>According to <a href="https://code.visualstudio.com/docs/cpp/natvis" rel="noreferrer">this link</a>, .natvis files can be used to visualise native objects. Specifically, I would like to be able to inspect <code>Eigen::Matrix</code> objects using <a href="https://bitbucket.org/eigen/eigen/src/246af84e462db0dd95ca68f8b5cca6e496b71cf3/debug/msvc/eigen.natvis?at=default&amp;fileviewer=file-view-default%20eigen.natvis" rel="noreferrer">this .natvis file</a>.</p>
  
  <p>However, the link above does not contain any information on how to actually use a .natvis file in VS Code. Is it possible using a custom .natvis file?</p>
  
  <p>Here is my launch.json file for reference:</p>
  
  <pre><code>{
      // Use IntelliSense to learn about possible attributes.
      // Hover to view descriptions of existing attributes.
      // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
      "version": "0.2.0",
      "configurations": [
          {
              "name": "g++-8 build and debug active file",
              "type": "cppdbg",
              "request": "launch",
              "program": "${fileDirname}/${fileBasenameNoExtension}",
              "stopAtEntry": false,
              "cwd": "${workspaceFolder}",
              "environment": [],
              "externalConsole": false,
              "MIMode": "gdb",
              "setupCommands": [
                  {
                      "description": "Enable pretty-printing for gdb",
                      "text": "-enable-pretty-printing",
                      "ignoreFailures": true
                  }
              ],
              "preLaunchTask": "g++-8 build active file",
              "miDebuggerPath": "/usr/bin/gdb"
          }
      ]
  }
  </code></pre>