一、安装插件


二、配置 task.json文件
按 Ctrl+Shift+B ,在 .vscode/tasks.json 文件配置成如下配置如下:
json
{
"version": "2.0.0",
"tasks": [
{
"type": "catkin_make",
"args":[
"--directory",
"./"
],
"problemMatcher":[
"$catkin-gcc"
],
"group": {"kind": "build","isDefault": true
},
"label": "catkin_make:build"
}
]
}
其中: "./" 表示指向工程目录
cpp
"args":[
"--directory",
"./"
],
配置完成后,按 Ctrl+Shift+B 即可触发catkin_make编译。