mfussenegger / nvim-dap

Debug Adapter Protocol client implementation for Neovim
GNU General Public License v3.0
5.11k stars 179 forks source link

Input in .vscode/launch.json can be asked multiple times #1112

Closed Diaoul closed 6 months ago

Diaoul commented 7 months ago

Debug adapter version

bbe2c6f3438542a37cc2141a8e385f7dfe07d87d

Steps to Reproduce

  1. Have a .vscode/launch.json file with the following content:

    {
    "tasks": [
    {
      "label": "Echo input",
      "type": "shell",
      "command": "echo ${input:echoPrompt}",
      "env": {
        "TEST_ENV": "${input:echoPrompt}"
      }
    }
    ],
    "inputs": [
    {
      "id": "echoPrompt",
      "description": "Please enter a value",
      "default": "default echo text",
      "type": "promptString"
    }
    ]
    }
  2. Run DAP

Expected Result

I am prompted only once for the value of echoPrompt

Actual Result

I am prompted twice for the value of echoPrompt

Feature initially introduced with https://github.com/mfussenegger/nvim-dap/issues/551

mfussenegger commented 6 months ago

Should be solved by https://github.com/mfussenegger/nvim-dap/pull/1119 but your given example launch json won't work, nvim-dap doesn't handle tasks.

Diaoul commented 6 months ago

Ah right, sorry for the shitty example 😬 Thanks for fixing despite this 🙏