更新时间:2022-08-12 16:16:17
{
"version": "2.0.0",
"tasks": [
{
"label": "compile", # 用于表示和引用task
"command": "g++", # 命令名
"args": ["${file}"] # 命令的参数, 有时使用的参数无效直接将该参数放到"command"中
},
{
"label": "run",
"args": ["build"],
"options": {
"cwd": "${workspaceRoot}/server"
}
},
{ # 同时启动两个task
"label": "Build",
"dependsOn": ["compile", "run"],
"group": [
"kind": "build",
"isDefault": true
]
}
]
}
还有group选项, 有test或者build两个值, 使用命令run build task或者run test task
launch.json使用默认的就好, 单击左侧的debug图标, 点击齿轮自动生成模板, 回到python源码文件, F5进行debug
但是在*nix中debug和build都可以