ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A
Ask Your Question

"No source available for main()" while debugging in Eclipse IDE

asked 2013-06-08 04:43:25 -0500

Sonne gravatar image

updated 2014-01-28 17:16:40 -0500

ngrennan gravatar image


I'm new to ros groovy and using catkin. I created a workspace, a catkin package with catkin_create_pkg and an eclipse project with catkin_make --force-cmake -G"Eclipse CDT4 - Unix Makefiles". Now in my workspace I have the src, devel and build folder and I can run the program in eclipse IDE. Therefore I need to choose "Run configurations" -> Created new Launch and browsed the binary. But if I try to debug it, eclipse doesn't show the source code, if it stops at a breakpoint and I just get No source available for main().

Does anyone have a solution?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-06-11 04:57:30 -0500

Sonne gravatar image

Ok, found the solution. Would be nice if this maybe could be a hint in the tutorial for beginners like me ;)

Just cd to build directory and then use

cmake ../src -DCMAKE_BUILD_TYPE=Debug

Now in Eclipse degugging should work.

edit flag offensive delete link more


What tutorial were you following?

joq gravatar imagejoq ( 2013-06-11 05:04:33 -0500 )edit

I'm not familiar with using Eclipse, but it would be nice if you added a note for eclipse users on what ever tutorial you were following.

William gravatar imageWilliam ( 2013-06-11 07:42:28 -0500 )edit

Hi joq and William, I followed the catkin tutorials and .Here in section "2.2 Catkin-y Approach" is a link to but didn't realized thats also the solution for my problem.

Sonne gravatar imageSonne ( 2013-06-11 11:08:58 -0500 )edit

@William Ok, I added a note on the

Sonne gravatar imageSonne ( 2013-06-12 23:03:37 -0500 )edit

@Sonne I have looked everywhere for this answer. THANK YOU!!!!! I am new to CMake and I'm trying to debug a project in Eclipse that is build with CMake. Your command did the trick. :-)

Lucy gravatar imageLucy ( 2013-08-29 10:55:38 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

The deadline to submit a proposal to present at ROSCon 2017 is June 25, 2017. Submit yours now!

Question Tools

1 follower


Asked: 2013-06-08 04:43:25 -0500

Seen: 3,756 times

Last updated: Jun 11 '13