通过文档扫描可以找到:
{
"key": "f4",
"command": "workbench.action.tasks.runTask"
}
但它只打开任务托盘并提示选择任务。问题是如何运行特定任务?
{
"key": "f4",
"command": "workbench.action.tasks.runTask.customTask"
}
//Command not found
通过文档扫描可以找到:
{
"key": "f4",
"command": "workbench.action.tasks.runTask"
}
但它只打开任务托盘并提示选择任务。问题是如何运行特定任务?
{
"key": "f4",
"command": "workbench.action.tasks.runTask.customTask"
}
//Command not found
这在此处记录。您可以通过args
属性提供任务名称来执行此操作,例如:
{
"key": "f4",
"command": "workbench.action.tasks.runTask",
"args": "Run tests"
}