microsoft / microsoft/vscode-cpptools
Warning in `launch.json`: Property `env` is not allowed
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the launch.json schema and validation entry point for the cppvsdbg debugger configuration, then compare how env and environment are handled. Done means the supported env form no longer produces a Property env is not allowed warning, with the existing debugger configuration checks still passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100