cmake文件内容
1.创建launch.json
2.选择 编译器
3.修改路径
4.增加断点
5.进入调试界面
6.F10单步跳过,F11单步调试
7.配置task.json
更改后直接F5调试即可,即可看见输出信息
{
"version":"2.0.0",
"options": {
"cwd": "${fileDirname}/build"
},
"tasks": [
{
"type": "shell",
"label": "cmake",
"command": "cmake",
"args": [
".."
]
},
{
"label": "make",
"command": "make",
"args": [
]
},
{
"label": "Build",
"dependsOrder": "sequence", //按列出的顺序执行任务依赖项
"dependsOn":[
"cmake",
"make"
]
}
],
}