Skip to content

Make launch.json envFile vars available for consumption in args:[] #158121

@blacktop

Description

@blacktop

I'd like to be able to have a .env file that has variables describing (in my case) positional input args to a debug config. I have about 100 debug config cases and I have to go and update ALL the input args to a NEW file if I want to go back and debug some regression.

So in my .env file I want to define ARG1="path to some file", ARG2="path to some other file" and then define:

      "envFile": "${workspaceRoot}/.vscode/.env",

and then in the SAME config JSON

      "args": [
         "-V",
        "${workspaceRoot}/${env:ARG1}",

That way I only have to define my test/debug arg files in one place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionality

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions