Debugging with eclipse and launch file

asked 2017-02-14 06:11:11 -0500

inspire gravatar image

updated 2017-02-14 10:43:04 -0500

Hi, is there a way to debug a ROS node with eclipse (breakpoints etc.) and use a launch file for the node?

This is what I tried:

  1. compiling with -DCMAKE_BUILD_TYPE=Debug

  2. adding launch-prefix="gdbserver localhost:10000" to the node element of the launch file

  3. starting the node with roslaunch and the launch file argument

  4. Creating a debug configuration: C/C++ Attach to application with gdbserver

With this, I am able to connect/start debugging and stop at breakpoints BUT eclipse doesn't show the contents of the source files ("no source available ..."). Hence, I am not able to step throught the program and see what happens.

Is there a way to make this work? Debugging nodes together with launch files should be possible somehow...

Thanks in advance!

EDIT: okay, I did it! You have to chose "C/C++ Remote Application" and select the "GDB (DSF) Manual Remote Debugging Launcher"!

edit retag flag offensive close merge delete

Comments

Is there any chance you could be more specific on what you did to get it working? I've been trying to do this for the last couple days now

TheMilkman gravatar image TheMilkman  ( 2018-07-09 22:22:10 -0500 )edit