Cannot debug cmake project [message #1726682] |
Tue, 15 March 2016 12:57  |
Eclipse User |
|
|
|
Hi,
I've recently switched to eclipse and I would like to debug my code step by step. My project is a cmake projects something like this:
- build/
- bin/
- src/
--- CMakeLists.txt
--- mainProject/
------ CMakeLists.txt
------ function1/
--------- something.h
--------- something.cpp
------ function2/
------ function3/
------ function4/
--- examples/
------ CMakeLists.txt
------ proj1/
--------- CMakeLists.txt
--------- main.cpp
------ proj2/
--------- CMakeLists.txt
--------- main.cpp
------ proj3/
--------- CMakeLists.txt
--------- main.cpp
When I run cmake from the build folder, I use:
cmake -D_ECLIPSE_VERSION=4.5 -DCMAKE_BUILD_TYPE=Debug ../src -G"Eclipse CDT4 - Unix Makefiles"
I've manually downloaded eclipse 4.5.2 and installed it into /opt/eclipse/. Eclipse is found and I start importing it into the IDE, which works. It also detects, that I've configured it as Debug.
In the run configuration, I add the executable in "Main -> Location" and the working directory, which is the "bin" folder. The code executes and the program runs without a problem. However, when I put breakpoints in the code, it won't stop there. I have no Idea, what I'm doing wrong - it should work like this.
I would be glad if someone could help me.
Thanks
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02369 seconds