Is it possible to set specific environment variables in VS Code workspace in VS Code settings?

Viewed 243

I have a project folder for some development (Pi Pico, but this is not essential). Normally, to start VS Code and be able to build projects, I have to start Developer Command Prompt and then start Code from this command prompt. The main purpose of this is that it brings in a number of environment variables that make it possible to run the necessary tools from Visual Studio Building Tools (approximately 40+ variables).

I was trying to find out if it is possible to set certain universal environment state for the VS Code workspace, but did not find anything. There are possibilities to set environment for certain actions, such as launching debugger, but not, for instance, to start a terminal Task.

This would really help as it is necessary that both the VS Code instance and any tasks started from it (and also the shell in terminal window) should share the exactly same environment. Hence, it is necessary to have this configuration on workspace level rather than limited to a specific task.

0 Answers
Related