Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Environment variables not working in Microsoft Visual Studio Code?

Testing out the new Microsoft Visual Code Studio. Trying to set some environment variables, and it seems setting them makes OpenDebug not run. Throws the error "OpenDebug process has terminated unexpectedly"

not running

And here's it running without issue when the environment variables is commented out.

running fine

Am I using it wrong or is it a bug?

like image 675
laggingreflex Avatar asked Apr 30 '15 08:04

laggingreflex


People also ask

How do I set Environment Variables in Visual Studio?

To access this page, select a project node in Solution Explorer, select Project > Properties from the Visual Studio menu, and then select the Environment Variables tab. Specifies the name of an environment variable that will be used when the project is built or when the project is run from Visual Studio.

How do I enable Environment Variables?

On the Windows taskbar, right-click the Windows icon and select System. In the Settings window, under Related Settings, click Advanced system settings. On the Advanced tab, click Environment Variables. Click New to create a new environment variable.

How do you activate a Conda environment in VS Code?

Ctrl+Shift+P and search “Terminal”. In the Terminal window, you can see “conda activate <env>” command already executed, and the terminal is under your conda environment.


2 Answers

You have to set runtimeExecutable.

"runtimeExecutable": "C:/Program Files/nodejs/node.exe"

enter image description here

like image 167
Vinicius Rocha Avatar answered Sep 19 '22 14:09

Vinicius Rocha


Update: Visual Studio code 0.3.0 has fixed this.

Environment variables do not work on Windows and Linux (they work on OS X). I have created a bug on our side and will make sure it’s fixed with the next release.

Andre Weinand, Visual Studio Code

like image 36
Andre Weinand Avatar answered Sep 18 '22 14:09

Andre Weinand