vscode-cpptools
vscode-cpptools copied to clipboard
Warning in `launch.json`: Property `env` is not allowed
Environment
- OS and version: Windows
- VS Code: Version: 1.92.0 b1c0a14de1414fcdaa400695b4db1c0799bc3124
- C/C++ extension: 1,21,5
- OS and version of remote machine (if applicable):
- GDB / LLDB version:
Bug Summary and Steps to Reproduce
Bug Summary:
Add the following to any C++ project's launch.json:
{
"type": "cppvsdbg",
"request": "launch",
"name": "INSERT NAME HERE",
"program": "INSERT PROGRAM PATH HERE",
"args": [
],
"internalConsoleOptions": "openOnSessionStart",
"cwd": "${workspaceFolder}",
"sourceFileMap": {},
"preLaunchTask": "Build Server",
"env": {
"PATH": ""
}
},
Note that env has a warning Property env is not allowed.
I am aware that environment is the officially recommended way to specify environment variables, but env is works too, and is significantly more convenient, as environment has extremely wacky and unintuitive syntax.
Debugger Configurations
{
"type": "cppvsdbg",
"request": "launch",
"name": "INSERT NAME HERE",
"program": "INSERT PROGRAM PATH HERE",
"args": [
],
"internalConsoleOptions": "openOnSessionStart",
"cwd": "${workspaceFolder}",
"sourceFileMap": {},
"preLaunchTask": "Build Server",
"env": {
"PATH": ""
}
},
### Debugger Logs
```shell
placeholder
Other Extensions
No response
Additional Information
No response