cannot debug planning module by using vscode
Dear Apollo developers, I built the Apollo but failed to run starting debugging. the error message said as follow:
Unable to start debugging. Program path '/home/li/apollo-master/bazel-bin/modules/planning/planning' is missing or invalid.
GDB failed with message: /home/li/apollo-master/bazel-bin/modules/planning/planning: 没有那个文件或目录.
I reproduce this error by:
- shift + ctrl + b in vscode to build
- click "Debug->start debugging" button
- using apollo 3.0 and ubuntu 14
other information: 1.I can run the planning process by using dreamview, so I think the execute files have complied successfully. 2.my launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "C++ Launch",
"type": "cppdbg",
"request": "launch",
// You can change the "planning" to your module name, but it should be
// same as in gdbserver of the docker container.
"program": "${workspaceRoot}/bazel-bin/modules/planning/planning",
// You can change "localhost:1111" to another "IP:port" name, but it
// should be same as in gdbserver of the docker container.
"miDebuggerServerAddress": "localhost:1111",
// You can change the task to meet your demands in the
// ".vscode/tasks.json" file (search the label:
// "start gdbserver", but the module name and the port
// number should be consistent with this file.
"preLaunchTask": "start gdbserver",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceRoot}",
"environment": [],
"externalConsole": true,
"linux": {
"MIMode": "gdb"
},
"osx": {
"MIMode": "gdb"
},
"windows": {
"MIMode": "gdb"
}
}
]
}
inside docker, can you try the following commands?
bash scripts/start_gdb_server.sh planning 1111 ps -ef | grep planning
@ycool I also meet this problem. I tried to run the bash scripts/start_gdb_server.sh planning 1111, planning is working. I can use gdb to attach "target remote", and the gdb server print connection info. But when using vscode, it shows **_Unable to start debugging. Program path '/apollo/bazel-bin/cyber/mainboard' is missing or invalid.
GDB failed with message: /apollo/bazel-bin/cyber/mainboard: No such file or directory._**
Stale issue closed.
@ycool I also meet this problem. I tried to run the bash scripts/start_gdb_server.sh planning 1111, planning is working. I can use gdb to attach "target remote", and the gdb server print connection info. But when using vscode, it shows **_Unable to start debugging. Program path '/apollo/bazel-bin/cyber/mainboard' is missing or invalid.
GDB failed with message: /apollo/bazel-bin/cyber/mainboard: No such file or directory._**
Hey, bro. I encountered the same problem, how did you solve it?