Working with the new VSCode editor on a node.js project. I am attempting to configure my \"Launch\" profile for debugging by editing the launch.json file. I need to setup a
For reference, I came across a similar issue (in 2020, long after the bug mentioned in the accepted answer above was fixed) for a different language and would like to point out something:
Accoding to Microsoft's documentation on launch configurations, many common options, including "env" are not requried features for all different debugging/run environments - that is to say, it seems to me that it is not VS Code that 'provides' the option for environment variables, but rather, the choice of the specific debugger extension to implement this feature. Therefore, either
Property "env" is not allowedmay occur because the particular language/debugger you are using doesn't support or hasn't implemented handling of environment variables.
As qbiq has said, probably a quick workaround for this if the environment variables are not going to change across launches would be to export them and run VS Code with this specific set of variables set.