【发布时间】:2021-06-29 05:47:41
【问题描述】:
我想要一个远程选项来调试应用程序。为此,我从以下配置创建了“launch.json”文件:
{
"version": "0.2.0",
"configurations": [
{
"type": "gdb",
"request": "attach",
"name": "Attach to gdbserver",
"executable": "/home/jakub/repo/app/build/app",
"target": "193.168.100.1:2345",
"remote": true,
"cwd": "/home/jakub/repo/app",
"gdbpath": "/home/jakub/repo/ext-toolchain/bin/arm-linux-gnueabihf-gdb",
"autorun": [
"info break"
]
}
]
}
首先我在 arm board 上启动 GDB Server:
# gdbserver :2345 app
Process app created; pid = 173
Listening on port 2345
然后调试器在 vscode 中触发,但没有任何反应,没有错误或反应。我只有暂停、重新启动和断开连接按钮。该程序绝对正确地构建为 Debug,因为我能够通过 GDB 控制台进行连接
【问题讨论】:
标签: linux visual-studio-code gdb gdbserver