ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
your method works on vscode too. Thank you very much!
the launch file in vscode is like
json
{
"name": "zs: gdbrun ros2",
"type": "cppdbg",
"request": "launch",
"program": "/usr/bin/python3",
"args": [
"/opt/ros/foxy/bin/ros2",
"topic",
"echo",
"/tf_static"
],
"stopAtEntry": false,
"cwd": "${workspaceRoot}",
"environment": [
{
"name": "RMW_IMPLEMENTATION",
// "value": "rmw_fastrtps_cpp"
// "value": "rmw_ecal_proto_cpp"
"value": "rmw_iceoryx_cpp"
}
],
"externalConsole": false,
// "preLaunchTask": "source_ros2_ws",
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},