Open
Description
We hope that in VSCode's tasks, it's possible to use Node.js scripts or shell scripts to dynamically generate candidate lists, allowing us to obtain the latest custom options before executing the script, rather than relying on static predefined choices.
I think the tasks.json
will like this:
{
"version": "2.0.0",
"inputs": [
{
"id": "pickTarget",
"type": "process",
"command": "node",
"args": [
"${workspaceFolder}/tools/get_targets.mjs"
]
}
],
"tasks": [
{
"label": "buildDebug",
"type": "shell",
"command": "cmd.exe",
"args": [
"/c",
"xmake config --mode=debug && xmake project -k compile_commands && xmake build ${input:pickTarget}"
],
"options": {
"cwd": "${workspaceFolder}"
},
"group": {
"kind": "build",
"isDefault": false
}
}
]
}