How do you debug KDevelop in KDevelop?

Igor Kushnir igorkuo at gmail.com
Sun Mar 29 11:08:35 BST 2020


Hello KDevelop developers!

I figured out a way to debug KDevelop in KDevelop, but wonder if it can 
be improved. I am running Manjaro GNU/Linux and have the kdevelop 
package from the system repository installed (this package is not 
customized by Manjaro, so it is the same as in Arch). I'm debugging a 
KDevelop version from git inside the KDevelop from the package (which is 
installed in /usr/).

Here is how I set the debugging up:
1. In build configuration->CMake select build type Debug; set 
installation prefix to "/home/<...>/installed-kdev".

2. Configure the same environment in the build configuration->CMake and 
launch configuration. (Is the environment useful for the build 
configuration? I suppose not):
CC=gcc
CXX=g++
QML2_IMPORT_PATH=/home/<...>/installed-kdev/lib/qml:$QML2_IMPORT_PATH
QT_PLUGIN_PATH=/home/<...>/installed-kdev/lib/plugins:$QT_PLUGIN_PATH

I have tried to add more variables from prefix.sh, but they make the 
debugger fail.

3. In the launch configuration select Executable -> 
"/home/<...>/installed-kdev/bin/kdevelop". Set Arguments: -s "test 
kdevelop5 session" (to avoid starting the last used session that 
contains the KDevelop project). Set the Dependencies Action to "Do Nothing".

4. After each source code modification that needs testing press F8 to 
build. If the build completes without errors press Shift+F8 to install. 
Then press F9 (customized from Alt+F9) to Debug OR Shift+F9 to execute 
without debugging.

My questions:
1) Does anyone know a better way to debug KDevelop?
2) Is it possible to build the binaries in proper relative locations to 
eliminate the installation step (something like 
https://community.kde.org/Guidelines_and_HOWTOs/Making_apps_run_uninstalled)?
3) Is it possible to combine F8, Shift+F8 and [Shift+]F9 in a single 
shortcut?
4) Do you bother to reduce the building/installation time by building 
and installing only the target, source code of which you just modified, 
e.g. a single plugin?

Thanks,
Igor


More information about the KDevelop-devel mailing list