Vscode-cpptools: support multiple natvis files in visualizerFile launch configuration

Created on 27 Jul 2017  路  10Comments  路  Source: microsoft/vscode-cpptools

Hello,
I have a project with some DLLs and an EXE. The DLLs link their own *.natvis files, say "dllA.natvis" and "dllB.natvis". The *.exe also has an "exe.natvis" file.
Since VSCode does not recognize the embedded *.natvis resources from the DLLs/EXE, I manually specify "visualizerFile" in my launch configuration.
However, I can only specify one *.natvis file for "visualizerFile", so I have to create an ad-hoc "all.natvis" which is basically the union of "dllA.natvis", "dllB.natvis" and "exe.natvis". I also have to remember to change "all.natvis" whenever I update one of the other *.natvis files.

This is cumbersome, I would prefer to just put

"visualizerFile": [
  "${workspaceRoot}/dllA/dllA.natvis", 
  "${workspaceRoot}/dllB/dllB.natvis", 
  "${workspaceRoot}/exe/exe.natvis", 
]

Could you please provide such a feature?

Best regards,
Peter

Feature Request debugger

Most helpful comment

So would I. Thanks!

All 10 comments

Or support "visualizerFileDirectory" and load each natvis files under it.

Any update on this? I'd also appreciate the feature

So would I. Thanks!

Indeed. I have natvis files in folders where their associated code lives, using CMake under Windows I add any found natvis to the projects, so VS proper uses all of them. Would be great to just use any it finds in an opened folder.

I also would be grateful for this feature :)

Any update? Hitting this as well, especially since the extension doesnt seem to look in the user directory(%USERPROFILE%\Documents\Visual Studio 2017\Visualizers)

I would also love this kind of functionality !

currently the only workaround is to copy custom natvis files to GlobalVisualizersDirectory, which is ~/.vscode(-insiders)/extensions/ms-vscode.cpptools-x.y.z/debugAdapters/vsdbg/bin/Visualizers.

Ref:
https://github.com/microsoft/MIEngine/blob/7afd062458dc8533fbfb6b6bb9a15cdab5d1029e/src/DebugEngineHost.VSCode/HostConfigurationStore.cs#L45-L50

currently the only workaround is to copy custom natvis files to GlobalVisualizersDirectory, which is ~/.vscode(-insiders)/extensions/ms-vscode.cpptools-x.y.z/debugAdapters/vsdbg/bin/Visualizers.

Looking at the code, that won't work for other backends though.

Please allow adding a custom folder with visualizers. I want to use the same visualizers with Visual Studio 2019.

Was this page helpful?
0 / 5 - 0 ratings