Telepathy programs have useful debug output for debugging. When you're facing a bug it's always a good idea to attach those debug output to the bug report.

Debugging (New Way)

Recent Empathy (2.27 onwards) includes a Debugging Console that allows you to retrieve debugging logs from supported Connection Managers. Not all Connection Managers support the Debug interface yet. For those CMs, you're going to have to retrieve the debug log the manual way.

To retrieve a debug log open Help->Debug in Empathy. This will show you the debugging logs for running Telepathy components. You can select the component using the combo in the top-left hand corner.

To save a debug log to a file, click Save. To copy the log to the clipboard, click Copy.

Normally the debug log's for both Empathy and the appropriate Connection Manager (e.g. gabble for XMPP, salut for Bonjour, butterfly for MSN, idle for IRC) will be required.

Debugging (Old Way)

Here is an example using telepathy-gabble (the Jabber connection manager); for more details and instructions for other protocols, see the Debugging page on the Telepathy wiki.

  1. Kill all Telepathy related processes. Quitting empathy should be enough but to make sure you may want to kill them:

    $ killall empathy mission-control telepathy-gabble telepathy-stream-engine

  2. Start programs in different consoles:
    $ GABBLE_LOGFILE=/tmp/gabble.log GABBLE_PERSIST=1 GABBLE_DEBUG=all $prefix/telepathy/telepathy-gabble
    $ $prefix/lib/telepathy/mission-control
    $ EMPATHY_LOGFILE=/tmp/empathy.log EMPATHY_DEBUG=all empathy
    If you want to debug audio or video issues, you can start empathy with
    $ EMPATHY_LOGFILE=/tmp/empathy.log GST_DEBUG=\*fsrtp\*:5 EMPATHY_DEBUG=all empathy
    Note: "$prefix" should be replaced by /usr/lib/ or /usr/libexec or something like that depending on your installation

If you want to always keep logs you can export *_LOGFILE, *_PERSIST and *_DEBUG in ~/.gnomerc or ~/.bashrc. To add timestamp in logs you can define *_TIMING.

Getting a Stack Trace

The most useful debugging information you can provide when encountering a crash in Empathy is by providing a stack trace.

  1. Install debuging symbols for Empathy and telepathy-*.
  2. Start Empathy with gdb

    $ gdb empathy
  3. Run Empathy

    (gdb) run
  4. Make it crash
  5. Get the stacktrace

    (gdb) thread apply all bt full
  6. Copy the output of bt to a pastebin (such as http://www.pastebin.com).

Empathy/Debugging (last edited 2009-10-23 12:22:28 by SumanaHarihareswara)