Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User input variables in launch config are broken #76558

Closed
roblourens opened this issue Jul 4, 2019 · 5 comments
Closed

User input variables in launch config are broken #76558

roblourens opened this issue Jul 4, 2019 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@roblourens
Copy link
Member

roblourens commented Jul 4, 2019

  • Add one of the special input to some launch config, like
"cwd": "${input:cwd}"
  • Start the launch config
  • Get "Cannot read property 'filter' of undefined"

From

const info = inputInfos.filter(item => item.id === variable).pop();

@isidorn
Copy link
Contributor

isidorn commented Jul 4, 2019

@weinand assigng to you, feel free to assign back to me if you would like me to investigate

@isidorn isidorn assigned weinand and unassigned isidorn Jul 4, 2019
@weinand
Copy link
Contributor

weinand commented Jul 4, 2019

I cannot reproduce.

Please note that "input" variables require a proper "input" section in the launch.json, e.g. this:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Hello World",
            "cwd": "${input:cwd}",
            "runtimeExecutable": "foo"
        }
    ],
    "inputs": [
        {
            "id": "cwd",
            "type": "promptString",
            "description": "Please enter a cwd value",
            "default": "default_cwd"
        }
    ]
}

This works fine.

But even if the "input" section is missing like here:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Hello World",
            "cwd": "${input:cwd}",
            "runtimeExecutable": "foo"
        }
    ]
}

I get a proper error message:

2019-07-04_11-15-49

@roblourens in which version of VS Code are you seeing this?
How does your "input" section looks like?

@weinand weinand added the info-needed Issue requires more information from poster label Jul 4, 2019
@weinand
Copy link
Contributor

weinand commented Jul 5, 2019

@roblourens ping?

@roblourens
Copy link
Member Author

Oh I forgot about the inputs section. But when that is missing, that's when the unhelpful error message shows up.

@vscodebot vscodebot bot closed this as completed Jul 12, 2019
@vscodebot
Copy link

vscodebot bot commented Jul 12, 2019

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@roblourens roblourens reopened this Jul 13, 2019
@weinand weinand added this to the July 2019 milestone Jul 13, 2019
@weinand weinand added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Jul 13, 2019
@lramos15 lramos15 added the verified Verification succeeded label Aug 1, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants