需要三个文件:
tasks.json
(按ctrl + shift + P
打开vscode控制台,输入Tasks: Configure Tasks,选择其他模板)
launch.json
(按F5就能出来)
c_cpp_properties.json
(按ctrl+shift+P
打开vscode控制台,输入C/Cpp: Edit configurations)
task.json文件中:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "bash build.sh"//自己修改的部分,这样每次调试之前都通过sh文件进行编译
}
]
}
launch.json文件中:
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"ver