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

How to insert breakpoints and step through a Gazebo plugin?

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

Angus gravatar image

Hello,

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!

Angus

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

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

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!

forum.soft32.com

inux-mobile-hacker.blogspot.com

edit flag offensive delete link more
0

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

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

Comments

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

Question Tools

1 follower

Stats

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

Seen: 1,259 times

Last updated: Jun 13 '16