背景
-
下午在linux下用vscode一直debug项目失败,并且运行 ./robot 也没有反应,感觉非常奇怪。最后发现如果要debug,vscode中./vscode 中的文件一定idea自己生成,方法就是删除launch.json 后点击下图左侧的debug标志来让idea自己生成。否则会报非常离奇的错误 ! ! !
-
自动生成的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": "Debug",
"type": "gdb",
"request": "launch",
"target": "/home/liuchaoqun/Documents/company/workspace/cable-inspection/build/robot",
"cwd": "${workspaceRoot}",
"valuesFormatting": "parseText",
// "MIMode": "gdb",
// "miDebuggerPath": "/usr/local/bin/gdb"
}
]
}
-
并且这里只需要3个文件即可进行debug
- image.png
- image.png
网友评论