I know that I can make VSCode prompt me for command-line arguments when launching a program under the debugger by specifying something like this in launch.json:
{
"configurations": [
{
"name": "(gdb) Launch MyApp",
"type": "cppdbg",
"program": "MyApp",
"args": [ "${input:arg}" ],
}
],
"inputs": [
{
"type": "promptString",
"id": "arg",
"description": "Enter argument",
"default": "something"
},
]
}
However, this only allows me to enter a single argument. To enter multiple, I can have multiple entries in the args array, one for each argument.
Unfortunately this does not scale when I want to test different combinations of zero to N command-line arguments, as it will require editing launch.json before every invocation.
Is there a way to have VSCode prompt me for all the command-line arguments on a single line, just as I would type them on a terminal?