ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to insert breakpoints and step through a Gazebo plugin?

asked 2012-05-24 04:17:25 -0500

Angus gravatar image


Does anyone know if there's any way to insert breakpoints and step through a Gazebo plugin? This would be very useful to help with debugging logical errors. I've tried inserting breakpoints in the eclipse editor, compiling and running the launch file but it doesn't seem to work. As such, I've just resorted to printf([var])'s for now.

Thanks very much!


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-05-31 03:55:47 -0500

SL Remy gravatar image

I've been curious myself. Here are two resources that I found on the issue from the gdb world. Hope they're more useful for you than they were for me!

edit flag offensive delete link more

answered 2016-06-13 02:45:59 -0500

Assuming that you are new about debugging tools, I give you simple example with GDB or LLDB. Just attach to a running process by like this command, and then insert breakpoints.

  • GDB

gdb -p $PROCESS_ID

  • LLDB

lldb attach -p $PROCESS_ID

  • How to know $PROCESS_ID

ps aux | grep gzserver

After a process was attached, you can use debugger commands. (e.g. set breakpoints, stepwise execution, continue. blah blah)

edit flag offensive delete link more


Daiki Maekawa gravatar image Daiki Maekawa  ( 2016-06-17 05:32:35 -0500 )edit

Question Tools

1 follower


Asked: 2012-05-24 04:17:25 -0500

Seen: 1,082 times

Last updated: Jun 13 '16