1.基本环境已经安装
2.ctrl + g 输入 >task 进入配置
3.修改配置文件
{
"version"
:
"0.2.0"
,
"configurations"
: [
{
"name"
:
"debug"
,
"type"
:
"cppdbg"
,
"request"
:
"launch"
,
"program"
:
"${debugPath}"
,//debug的二进制文件路径
"args"
: [
"{argsPath}"
], // 软件运行的参数路径
"stopAtEntry"
:
false
,
"cwd"
:
"{casePath}"
,
// 软件运行的例子路径
"environment"
: [],
"externalConsole"
:
false
,
"MIMode"
:
"gdb"
,
"setupCommands"
: [
{
"description"
:
"Enable pretty-printing for gdb"
,
"text"
:
"-enable-pretty-printing"
,
"ignoreFailures"
:
true
}
],
"miDebuggerPath"
:
"/home/lenovo/env/bin/gdb"
}
]
}