7

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?

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
laggingreflex
  • 32,948
  • 35
  • 141
  • 196
  • 2
    Probably a bug, I get the same result. I had Processes Explorer open and quickly checked the properties of OpenDebug.exe before it exited. Turns out it has _no_ environment variables set at all... – Simon Apr 30 '15 at 15:10
  • 1
    Visual Studio code 0.3.0 has fixed this. – Andre Weinand Jun 02 '15 at 22:25

3 Answers3

7

You have to set runtimeExecutable.

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

enter image description here

Vinicius Rocha
  • 4,023
  • 4
  • 29
  • 38
7

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

laggingreflex
  • 32,948
  • 35
  • 141
  • 196
Andre Weinand
  • 1,907
  • 11
  • 8
  • This apparently is still an issue if you launch from the dock icon in Ubuntu and its derivatives...any idea on how to fix that? – Rig Jun 17 '23 at 01:18
6

I solved a similar issue by making sure that I ran code in Administrator mode under Windows - worth a try.

keithl8041
  • 2,383
  • 20
  • 27
  • This worked for me when trying to run an executable through an extension... VS Code couldn't find the executable even though the directory was in my PATH variable. No idea why running it normally didn't work – Alex Aug 10 '16 at 09:09
  • Solved my issue. Recently updated my windows to 11. Before, code was started as administrator default, but this got removed during the update. Since then I couldn't figure out why 1. My conda envs are not updating, 2. PATH variables can't be accessed 3. when starting code from anaconda prompt made it work – Inyoung Kim 김인영 Dec 27 '21 at 12:20