This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Debugging KDevelop from KDevelop

Tags: None
(comma "," separated)
zhigalin
Registered Member
Posts
8
Karma
0
OS

Debugging KDevelop from KDevelop

Thu Jun 09, 2016 11:05 am
Hi.
I need to debug KDevelop.
I have cloned the repo, opened it with KDevelop, wrote some code, compiled it and tried to debug.
But the breakpoints are working only within KDevelop but not inside KDevPlatform.
The breakpoints are always listed as awaiting ones.
Both are compiled with CMAKE_BUILD_TYPE=Debug.
What I am doing wrong?

Last edited by zhigalin on Fri Jun 10, 2016 9:51 am, edited 2 times in total.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
Did you build in debug mode (-DCMAKE_BUILD_TYPE=debug)?


I'm working on the KDevelop IDE.
zhigalin
Registered Member
Posts
8
Karma
0
OS
scummos wrote:Did you build in debug mode (-DCMAKE_BUILD_TYPE=debug)?

Yes.
P.S. See the updated question.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: Debugging KDevelop from KDevelop

Fri Jun 10, 2016 10:08 am
Is the kdevelop you built actually linked against your self-built kdevplatform, or do you maybe have a system one floating around? Try to check that with ldd ...


I'm working on the KDevelop IDE.
zhigalin
Registered Member
Posts
8
Karma
0
OS
scummos wrote:Is the kdevelop you built actually linked against your self-built kdevplatform, or do you maybe have a system one floating around? Try to check that with ldd ...

You're right.
How I should compile KDevelop to link it with mine KDevPlatform?
User avatar
Aetf
KDE Developer
Posts
1
Karma
0
OS
Edit: I was wrong, it's CMAKE_PREFIX_PATH and not CMAKE_MODULE_PATH, changed that.

-----------

zhigalin wrote:How I should compile KDevelop to link it with mine KDevPlatform?


You need to first compile KDevPlatform and install it to somewhere, say ~/stage.
Code: Select all
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/stage ..
make install


Then append that path to CMAKE_PREFIX_PATH when configure KDevelop
Code: Select all
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/stage -DCMAKE_PREFIX_PATH=~/stage/lib64/cmake ..
make install


This way cmake will find your newly built KDevPlatform. Hint: you can locally change KDevPlatform version to a higher number than the one in the system and modify KDevelop to require at least that number. Then you can be sure that you are building against the custom build of KDevPlatform.

In order to run KDevelop built this way, you have to specify various paths
Code: Select all
env QT_PLUGIN_PATH=~/stage/lib64/plugins LD_LIBRARY_PATH=~/stage/lib64 XDG_DATA_DIRS=~/stage/share:$XDG_DATA_DIRS ~/bin/kdevelop
zhigalin
Registered Member
Posts
8
Karma
0
OS
Aetf wrote:Edit: I was wrong, it's CMAKE_PREFIX_PATH and not CMAKE_MODULE_PATH, changed that.

-----------

zhigalin wrote:How I should compile KDevelop to link it with mine KDevPlatform?


You need to first compile KDevPlatform and install it to somewhere, say ~/stage.
Code: Select all
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/stage ..
make install


Then append that path to CMAKE_PREFIX_PATH when configure KDevelop
Code: Select all
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/stage -DCMAKE_PREFIX_PATH=~/stage/lib64/cmake ..
make install


This way cmake will find your newly built KDevPlatform. Hint: you can locally change KDevPlatform version to a higher number than the one in the system and modify KDevelop to require at least that number. Then you can be sure that you are building against the custom build of KDevPlatform.

In order to run KDevelop built this way, you have to specify various paths
Code: Select all
env QT_PLUGIN_PATH=~/stage/lib64/plugins LD_LIBRARY_PATH=~/stage/lib64 XDG_DATA_DIRS=~/stage/share:$XDG_DATA_DIRS ~/bin/kdevelop


Mmm, I'm using KDevelop 5 build with kdesrc, is there an other way?
zhigalin
Registered Member
Posts
8
Karma
0
OS
zhigalin wrote:
Aetf wrote:Edit: I was wrong, it's CMAKE_PREFIX_PATH and not CMAKE_MODULE_PATH, changed that.

-----------

zhigalin wrote:How I should compile KDevelop to link it with mine KDevPlatform?


You need to first compile KDevPlatform and install it to somewhere, say ~/stage.
Code: Select all
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/stage ..
make install


Then append that path to CMAKE_PREFIX_PATH when configure KDevelop
Code: Select all
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/stage -DCMAKE_PREFIX_PATH=~/stage/lib64/cmake ..
make install


This way cmake will find your newly built KDevPlatform. Hint: you can locally change KDevPlatform version to a higher number than the one in the system and modify KDevelop to require at least that number. Then you can be sure that you are building against the custom build of KDevPlatform.

In order to run KDevelop built this way, you have to specify various paths
Code: Select all
env QT_PLUGIN_PATH=~/stage/lib64/plugins LD_LIBRARY_PATH=~/stage/lib64 XDG_DATA_DIRS=~/stage/share:$XDG_DATA_DIRS ~/bin/kdevelop


Mmm, I'm using KDevelop 5 build with kdesrc, is there an other way?


Solved by adding cmake build type=Debug to kdesrc-build.


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]