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

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

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

Sonne gravatar image

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

ngrennan gravatar image

Hi,

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
3

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

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

Comments

What tutorial were you following?

joq gravatar image joq  ( 2013-06-11 05:04:33 -0600 )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 image William  ( 2013-06-11 07:42:28 -0600 )edit

Hi joq and William, I followed the catkin tutorials http://www.ros.org/wiki/catkin/Tutorials and http://www.ros.org/wiki/IDEs .Here in section "2.2 Catkin-y Approach" is a link to http://answers.ros.org/question/52013/catkin-and-eclipse/ but didn't realized thats also the solution for my problem.

Sonne gravatar image Sonne  ( 2013-06-11 11:08:58 -0600 )edit

@William Ok, I added a note on the http://www.ros.org/wiki/IDEs

Sonne gravatar image Sonne  ( 2013-06-12 23:03:37 -0600 )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 image Lucy  ( 2013-08-29 10:55:38 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 6,894 times

Last updated: Jun 11 '13