debugging plugins

Chris DeveloperChris at rebel.com.au
Fri Apr 8 09:56:23 BST 2022


I have managed to get most of the way to fixing the problem.  I added 
QT_PLUGIN_PATH to the environment variables and pointed to the plugin 
directory in my build folder. I put my build folder first so it finds the 
correct plugin (just compiled) to use.

Now I am able to load a kmy file and all the plugins are loaded correctly 
however I have a new problem!

I get the following errors on load...

     kf5.kxmlgui: cannot find .rc file "*.rc" for component "*"

The rc files must be moved into a specific folders to work and changing 
KDEDIRS does not work. The solution to this appears to be after the first 
build run `sudo make install`.

 From then on due to the QT_PLUGIN_PATH modification I can alter and debug 
plugins without the need to `make install` every time


Chris


On 8/04/2022 4:29 pm, Thomas Baumgart via KMyMoney-devel wrote:
> Hi,
>
> On Freitag, 8. April 2022 01:14:06 CEST Chris via KMyMoney-devel wrote:
>
>> Hi
>>
>> I am compiling kmymoney to run the debugger over a couple of plugins. When I
>> do so setting a breakpoint fails in the source code of the plugin I want to
>> debug (csv import).
>>
>> I read that its best to statically link the plugins for debugging purposes
>> so I recompiled using -DBUILD_SHARED=OFF -DBUILD_STATIC_PLUGINS=ON to
>> statically link the shared libs
> There is an initiative to link KMyMoney statically with all the plugins included
> and that maybe where this fits in. Rest assured, one can debug the plugins
> even if they are linked dynamically. I do this all the time. A few things have
> to be kept in mind, though. Please see below.
>
>> However now when kmymoney starts it says it "couldn't find any plugin for
>> opening storage". When I look under Settings=>Configure KmyMoney there are
>> no plugins shown
> That shows, that you build the application and plugins but did not install them.
> For KMyMoney to pick them up, you need to install the application in your KDE
> environment (my preferred way) or modify settings (env variables) so that
> KDE will search your build environment (too). For the install process to work
> properly you have to uninstall any version that come with your distro before.
>
>> if I use ldd I get the text below which doesn't include the libraries I am
>> expecting it to include.
> That is what differentiates shared libs and plugins: ldd finds the shared libs
> which are loaded 'before' the application starts. In contrast, plugins are
> searched and loaded at runtime by the application through the plugin mechanism.
> This mechanism searches the plugins in pre-defined locations.
>
>> Version 5.0.8-d0ad2084c
>> KDE Frameworks 5.54.0
>> Qt 5.11.3 (built against 5.11.3)
>> The xcb windowing system
>>
>> I tried to compile the latest kmymoney but I am on Debian 10 buster and it
>> doesn't compile.
>>
>>
>> Can any one advise what else I need to do to statically link the libs so I
>> can debug this application? or if there is another preferred way.
>>
>> BTW I am using kdevelop as my IDE and I am not trying to fix the plugin I am
>> looking to alter the way it works. so there is no bug report.
> I am using KDevelop myself and have no problems with debugging the plugins
> when the application and plugins are 'installed' using 'sudo make install'.
> In case you modify a plugin, you have to install it that way *before* you
> start the next debug session. Otherwise, it will use the previous installed
> one and you see strange results.
>


More information about the KMyMoney-devel mailing list