Skip to content

User input variables not working for launch configuration in multi-root workspace #96522

@RLThomaz

Description

@RLThomaz
  • VSCode Version:
Version: 1.44.2
Commit: ff915844119ce9485abfe8aa9076ec76b5300ddd
Date: 2020-04-16T17:50:03.709Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.3.0-46-generic snap
  • OS Version: Ubuntu Bionic 18.04 Ubuntu Xenial 16.04 running on Docker instance.

Steps to Reproduce:

  1. Create a multi-root workspace settings file.
  2. Add a launch configuration object with the inputs and configurations.
  3. Try to lunch the configuration (debugger).
  4. Get an error message saying:
Undefined input variable 'variableNameHere' encountered. Remove or define 'variableNameHere' to continue.

E.g.

{
  "folders": [
    {
      "path": "myLocalFolder"
    }
  ],
  "launch": {
    "version": "0.2.0",
    "inputs": [
      {
        "id": "myIndex",
        "type": "promptString",
        "default": "",
        "description": "Index of something to be processed."
      }
    ],
    "configurations": [
      {
        "name": "MyProject (Debug)",
        "type": "cppdbg",
        "request": "launch",
        "program": "${workspaceFolder:myLocalFolder}/myproject/bin/process",
        "args": [
          "-i",
          "${input:myIndex}"
        ],
        "stopAtEntry": false,
        "cwd": "${workspaceFolder:myLocalFolder}",
        "environment": [],
        "externalConsole": false,
        "preLaunchTask": "Build (MyProject)",
        "linux": {
          "MIMode": "gdb"
        },
        "osx": {
          "MIMode": "lldb"
        },
        "windows": {
          "MIMode": "gdb"
        }
      }
    ]
  }
    ...
}

Does this issue occur when all extensions are disabled?: Cannot test - working inside a docker container lunched by the docker extension.

p.s.: the inputs work just fine for tasks in multi-root workspace.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code Insidersvariable-resolvingverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions