PowerShell / PowerShell/vscode-powershell
Feature Request: Support the "env" key in launch.json for debugging Environment Variable setup
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 547
- PR merge metrics
- No merged PRs in 30d
Description
Prerequisites
- I have written a descriptive issue title.
- I have searched all issues to ensure it has not already been reported.
Summary
When debugging PowerShell scripts it is necessary at times to set environment variables to be used for given debug configuration.
This use-case is especially necessary when debugging scripts that are to be used in conjunction with Azure devops YAML pipelines as all pipeline variables are environment variables. Example: Where we have multiple pipeline steps emitting variables (YAML template expression "each" usage) and we use a PowerShell script to gather the outputs for processing and formatting (YAML template expression "join" used to pass parameters to the PowerShell script). Debugging this use-case is harder than it needs to be right now and suggested work arounds, whilst usable, are cumbersome.
Proposed Design
Support for an "env" key for "PowerShell" debugging as per other configuration types please, e.g.
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 tracing how the PowerShell extension reads debugging configurations from launch.json and compare that handling with other VS Code configuration types that support env. Done means a PowerShell debug configuration can define environment variables and the launched script receives them; verify the behavior with the extension's existing debugging checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, typescript, vscode
- Domain
- developer-experience, devtools
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 66/100