Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setup environment using script in Visual Studio Code

I use remote development in Visual Studio Code for a C++/CMake project. However I need to setup a proper build environment before running cmake.

I know I can setup the environment manually by adding each variable to settings.json, but this is not really viable for me since there are a lot of variables that change frequently.

Is there a way I can have Visual Studio Code source a script before running CMake or automate this in any other way?

like image 925
Zitrax Avatar asked Jan 24 '26 20:01

Zitrax


1 Answers

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/ sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'

like image 163
Palak Mistry Avatar answered Jan 27 '26 16:01

Palak Mistry