Debugging ROS nodes started from launch file with Eclipse

By Christopher, December 14, 2014


  • Imported ROS project into Eclipse workspace (see for details)
  • Installed gdbserver (apt-get install gdbserver)

Follow the steps below.

1) Adjust the launch file:

Add this to the node tag if you want a new terminal window for the process

launch-prefix="xterm -e gdbserver localhost:10000"

or add the following if you want to stay in the current started terminal.

launch-prefix="gdbserver localhost:10000"

2) Eclipse Debug Configuration

Add a new Eclipse debug run configuration for C/C++ Remote Application. Adjust the path to your C/C++ application binary, leave everything else default

Debug Configurations _023

3) Execution

First execute ROS launch with your launch file. You can either do this from the terminal or by a external tools hook from eclipse (

Because I am using a multi-package ROS-Eclipse project and my launch files are always in the root of a package I am using ${container_name}  instead of ${project_name} for the external tools arguments in Eclipse.

Now you will see that a small gdb terminal has opened if you are using the first version of launch file configuration from above.


Now, just start your Eclipse debug configuration and you are ready to debug.


Further References