资料
方法
- 设置 tasks.json
ctrl+shift+p 选择配置任务(tasks:Configure Task)
编辑task.json(./.vscode/task.json)
{
"version": "2.0.0",
"tasks": [
{
"label": "Build Project",
"type": "shell",
"command": "npm",
"args": ["run", "build"],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Run Tests",
"type": "shell",
"command": "npm",
"args": ["run", "test"],
"group": {
"kind": "test"
}
}
]
}
ctrl+shift+B 或者 ctrl+shift+p 输入 task run 运行
或者下载Task Manager 拓展
- 设置 launch.json