Skip to content

Support expanding input parameters into multiple arguments #83678

@anatolyburakov

Description

@anatolyburakov

Currently, it is possible to specify debug arguments from input, using this syntax:

        "inputs": [
                {
                        "id": "mystr",
                        "type": "promptString",
                        "description": "",
                }
        ]

And having this prompt appear in launch.json:

        "configurations": [
                {
                        "name": "myexe",
                        "type": "cppdbg",
                        "request": "launch",
                        "program": "myexepath",
                        "args": [
                                "${input:mystr}"
                        ]
                }
        ]

This will cause a prompt to appear, asking for arguments to pass to the application. However, it is only possible to pass one argument that way.

It would be nice if it was possible to expand this:

"-a 5 -b 10 -c 15 -d \"some string\""

into this:

["-a", "5", "-b", "10", "-c", "15", "-d", "some string"]

This would make opportunistic debugging (testing with different parameters quickly) much easier, and will avoid polluting the launch.json with targets that are used only once and then discarded.

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions