Skip to content

Feature Request: Support the "env" key in launch.json for debugging Environment Variable setup #4998

Open
@johngladp

Description

@johngladp

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.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions