I have some shell scripts, which I would like to execute by name from code during debugging in Visual Studio Code. I need to extend $PATH environment variable to make it happene
On Windows platform I found that Visual Studio Code seems to be case-sensitive. If the name of the variable is not spelled exactly as it is spelled on your machine, Visual Studio Code will ignore your variable from the launch.json.
For example, to properly set path
environment variable when it is spelled Path
, you would need to add the following to launch.json.
"env": {
"Path": "${env:Path};${workspaceFolder}\\node_modules\\.bin"
},
See Launch.json attributes and Variable Substitution in Visual Studio Code documentation for more information. Here what's mentioned there about the variable casing under Variable Substitution:
Note: Be sure to match the environment variable name's casing, for example ${env:Path} on Windows.
This is odd, because Windows is case-insensitive to the names of environment variables