Difference between revisions of "Projects/PIM/Akonadi/Development Tools"

< Projects‎ | PIM‎ | Akonadi
Jump to: navigation, search
(Added Category:PIM)
(it doesn't accept a list + add example)
Line 5: Line 5:
 
== Attaching gdb at startup ==
 
== Attaching gdb at startup ==
  
Export the environment variable '''AKONADI_DEBUG_WAIT''' and put a list of agent types in there you want to debug.
+
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:
 +
<code>
 +
export AKONADI_DEBUG_WAIT=maildir
 +
</code>
  
When starting an agent of one of these types, you'll see the following debug output by the Akonadi server which is pretty much self-explanatory.
+
When starting an agent of this type, you'll see the following debug output by the Akonadi server which is pretty much self-explanatory.
  
 
<pre>
 
<pre>
Line 19: Line 22:
 
== Running an agent in valgrind ==
 
== 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 list in there.
+
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.
 
Additionally, you can specifiy the valgrind tool to use by exporting '''AKONADI_VALGRIND_SKIN''', the default is memcheck.
  
 
[[Category:PIM]]
 
[[Category:PIM]]

Revision as of 17:19, 3 January 2009

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=maildir

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