I would like to use Visual Studio Code to compile and debug projects (C++, Nim), but I don't want to add the tool paths to my global Windows PATH
settings, to avoid conflicts with other applications. In particular, I don't want to add the MinGW path.
How can I setup Visual Studio Code to add a path for all the tools - not only the terminal?
What I have tried
I saw a few similar questions, including this one which is somewhat outdated but has a few recent comments. I changed my VCS user settings by adding this:
"terminal.integrated.env.windows": {
"PATH": "${env:PATH}c:\\dev\\msys64\\mingw64\\bin"
},
and sure enough, if I open a terminal and type gcc
, it executes normally, or if I check $env:PATH
, I can see that it is set as expected.
But when I do Start debugging
or Run without debugging
from the editor, it fails:
Problems loading reference 'vscode://schemas/ignoredSettings': Unable to load schema from 'vscode://schemas/ignoredSettings': cannot open vscode://schemas/ignoredSettings. Detail: Unable to resolve text model content for resource vscode://schemas/ignoredSettings.
Note that it works fine if I add the MinGW bin path to my Windows PATH
instead, but that's what I'm trying to avoid.