microsoft / microsoft/vscode-cmake-tools
Allow to inject env variables from envFile or env script before running "CMake: Launch the selected target"
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 546
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 32
Description
### Brief Issue Summary
Currently we can only define hardcoded env vars in kits when a target is executed through "CMake: Launch the selected target", but we can't source a script instead or pass an envFile.
It would be very convenient to be able to source a custom script with a path supporting Command substitution (like `${command:cmake.buildDirectory}/env.sh` for example), so that env vars are injected before running executable.
### CMake Tools Diagnostics
_No response_
### Debug Log
_No response_
### Additional Information
_No response_
Contributor guide
Research direction
Start from the implementation of "CMake: Launch the selected target" and the existing kit handling for hardcoded environment variables. Determine how an envFile or env script with command substitution should be accepted and sourced before the executable runs; done means the selected target receives those injected variables.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, typescript
- Domain
- build-system, devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100