Projects/PIM/Akonadi/Development Tools

< Projects‎ | PIM‎ | Akonadi
Revision as of 17:24, 3 January 2009 by TMG (Talk | contribs)

Jump to: navigation, search

Debugging Akonadi Agents

Agents are automatically started by the Akonadi server and thus are not debugable from the start on by the usual methods. A similar problem is known from KIO slaves, the solution is similar as well.

Attaching gdb at startup

Export the environment variable AKONADI_DEBUG_WAIT and put the agent type in there you want to debug. You only need to specify a part of the agent type, not the whole one. Example: export AKONADI_DEBUG_WAIT=knut

When starting an agent of this type, you'll see the following debug output by the Akonadi server which is pretty much self-explanatory.

============================================================
ProcessControl: Suspending process akonadi_knut_resouce
'gdb -pid 1234' to debug
'kill -SIGCONT 1234' to continue
============================================================

Running an agent in valgrind

Running an agent in valgrind is done in a similar way, you need to export AKONADI_VALGRIND and put the agent type in there.

Additionally, you can specifiy the valgrind tool to use by exporting AKONADI_VALGRIND_SKIN, the default is memcheck.


KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal