v1.30 has added this functionality: input variables during tasks and debug.
For user input variables, we introduced a new variable category input,
which results in this syntax: ${input:variableName}. This simple
syntax is not sufficient to present meaningful UI to the end user, so
we've introduced a new inputs section in launch.json and tasks.json,
where additional configuration attributes are specified.

Here is the list of supported attributes:
id - The corresponding variable name for which these attributes are
used.
type - The type of user input widget. In this release, promptString
(for a string InputBox) and pickString (for a string Quick Pick) are
supported.
description - Descriptive text shown to the user.
default - The default value to use if the user just presses Enter.
A first example shows how to use a user input variable in a task
configuration (tasks.json):
{
"tasks": [
{
"label": "Echo input",
"type": "shell",
"command": "echo ${input:echoPrompt}"
}
],
"inputs": [
{
"id": "echoPrompt",
"description": "Please enter a value",
"default": "default echo text",
"type": "promptString"
}
]
}
Another example shows a user input variable for selecting between two
options in a debug configuration (launch.json):
{
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/${input:pickProgram}"
}
],
"inputs": [
{
"id": "pickProgram",
"description": "Select client or server",
"type": "pickString",
"options": ["client.js", "server.js"],
"default": "client.js"
}
]
}
We plan to combine user input variables with the existing
command-based variables so that user input variables can be
contributed by extensions.