从下面这个链接中获取代码,其他链接有些make操作的错误,在下面这个链接中我改好了
bryantaoli/PPP-BayesTree
参考下面这个配置vscode
VScode单步调试_fb_941219的博客-CSDN博客_vscode单步调试
之后会报错:
Unable to open 'raise.c': File not found (file:///build/glibc-S7Ft5T/glibc-2
参考下面的链接解决上一个报错
https://www.cnblogs.com/xqmeng/p/13928384.html
附上launch.json文件
{
// 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/taolihao/Documents/Project/GNSS/PPP-BayesTree/trunk/build/examples/pppBayesTree",
"args": ["-c","/home/taolihao/Documents/Project/GNSS/PPP-BayesTree/trunk/data/91702.conf"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
"sourceFileMap":
{
"/build/glibc-S7Ft5T": "/usr/src/glibc"
}
}
]
}
最后发现无法命中断点
需要在examples文件夹下加入下面这句话set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
|