~ubuntu-branches/ubuntu/quantal/folks/quantal

« back to all changes in this revision

Viewing changes to docs/wiki/debugging.valadoc

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-09-12 09:48:10 UTC
  • mfrom: (1.6.2)
  • Revision ID: package-import@ubuntu.com-20120912094810-6zlx8889hcovxj7p
Tags: 0.7.4.1-0ubuntu1
* New upstream bugfix release
* debian/control:
  - Bump build-depends on libglib2.0-dev, valac-0.18, libvala-0.18-dev
* debian/libfolks-eds25.symbols:
* debian/libfolks25.symbols:
  - Updated

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
The main way to debug libfolks (or applications using it) is using the ''G_MESSAGES_DEBUG'' environment variable. For example, to collect a log file of all libfolks debug data from Empathy, use the command:
 
2
{{{
 
3
FOLKS_DEBUG_NO_COLOUR=1 G_MESSAGES_DEBUG=all empathy &> folks.log
 
4
}}}
 
5
 
 
6
Available values for folks for the ''G_MESSAGES_DEBUG'' environment variable are:
 
7
 
 
8
 * ''all'' (equivalent to listing all possible values)
 
9
 * ''folks'' (for the core of libfolks)
 
10
 * ''eds'' (for the evolution-data-server backend)
 
11
 * ''key-file'' (for the key file backend)
 
12
 * ''libsocialweb'' (for the libsocialweb backend)
 
13
 * ''telepathy'' (for the Telepathy backend)
 
14
 * ''tracker'' (for the Tracker backend)
 
15
 
 
16
Multiple values can be specified using commas, e.g.: ''G_MESSAGES_DEBUG=folks,eds,key-file''.
 
17
 
 
18
Another way to debug libfolks itself is to run the //folks-inspect// utility which is bundled with libfolks (possibly in a utils or tools package, depending on your distribution). Its use is beyond the scope of this page, but it has a ''help'' command which should serve as an introduction.
 
19
 
 
20
Finally, libfolks has a status printing mechanism. Some libfolks clients may expose this as part of their own debug functionality (for example, folks-inspect uses this for its ''debug'' command), but it can be invoked more generally using gdb:
 
21
 
 
22
 * Run the libfolks client you wish to debug under gdb.
 
23
 * Break execution at a suitable (for example, once you've got the client into an erroneous state you wish to examine).
 
24
 * At gdb's command prompt, enter the following commands:
 
25
 
 
26
{{{
 
27
set $folks_debug = folks_debug_dup()
 
28
call folks_debug_emit_print_status($folks_debug)
 
29
}}}
 
30
 
 
31
This will print out a listing of the state of all the objects relevant to libfolks' linking decisions.
 
32
 
 
33
Finally, libfolks outputs debug and status information using terminal colours and formatting by default. If this isn't desired, set the ''FOLKS_DEBUG_NO_COLOUR'' environment variable.
 
34