主要就是调试的配置文件,program 和cwd 默认值无效,替换全路径后正常。
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "/home/yangdada/projects/project/logaudit/logaudit",
"args": ["-f logaudit.conf"],
"stopAtEntry": true,
"cwd": "/home/yangdada/projects/project/logaudit/",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}