Differences between revisions 4 and 6 (spanning 2 versions)
Revision 4 as of 2014-09-22 20:12:35
Size: 1640
Editor: dx
Comment: remove comment that makes 3.0.3 sound like it's bleeding edge
Revision 6 as of 2016-05-07 20:45:29
Size: 2215
Editor: dx
Comment: add some notes about libpurple
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
For long, this has been hard or even impossible. Unfortunately, depending on what you want, it still is. As I'm rewriting parts of BitlBee, I'm adding debugging hooks to them now. Since BitlBee is a daemon, it will always be a little more complicated to get debugging output though. {{{#!wiki caution
Line 5: Line 5:
In all cases, be careful. The output is not stripped from private info like your IM passwords. If you're sharing info on something like pastebin, make sure you strip out the passwords first. Be careful when posting debug logs. The output might have private info like your IM passwords, contact email addresses, user IDs, access tokens, etc.

If you're sharing info on something like pastebin, make sure you strip out private info first.
}}}
Line 11: Line 14:
This one's easy, and works even if you're on a public server. This one's easy, and works even if you're on a public server. It won't work if you use libpurple's jabber, see the following sections for that.
Line 18: Line 21:

This will show the whole login sequence. The packet that sends the password is censored with stars.
Line 30: Line 35:
To get debug output, you have to launch BitlBee by hand instead of from the init script, with the BITLBEE_DEBUG=1 environment variable set. Also, you should pass some flags so it won't daemonise (and close stdout, stderr, etc.). To get debug output, you have to launch !BitlBee by hand instead of from the init script, with the BITLBEE_DEBUG=1 environment variable set. Also, you should pass some flags so it won't daemonise (and close stdout, stderr, etc.).
Line 35: Line 40:
BITLBEE_DEBUG=1 /usr/sbin/bitlbee -nD BITLBEE_DEBUG=1 bitlbee -Dnv
Line 38: Line 43:
This may not be very useful, as not all protocols use this method of debugging. Good luck!
Line 39: Line 46:

== Libpurple ==

When using bitlbee-libpurple, you can't use daemon mode (-D), and using forkdaemon mode (-F) makes debugging difficult.

Using the {{{BITLBEE_DEBUG=1}}} environment variable as mentioned in the previous section workarounds this, letting you use daemon mode with libpurple, '''but it will only work for the first connection''' from your irc client, and will abort if you try to connect more than once to the same bitlbee instace. Just restart it if you need more than one connection.

Getting debugging info out of BitlBee

Be careful when posting debug logs. The output might have private info like your IM passwords, contact email addresses, user IDs, access tokens, etc.

If you're sharing info on something like pastebin, make sure you strip out private info first.

First of all, ignore the debug setting. It's useless. It should probably be removed.

XMPP/Jabber debugging

This one's easy, and works even if you're on a public server. It won't work if you use libpurple's jabber, see the following sections for that.

Before connecting, you can enable xmlconsole to get raw XMPP traffic in a PM window from the _xmlconsole contact:

account jabber set xmlconsole true

This will show the whole login sequence. The packet that sends the password is censored with stars.

Or, if already connected, you can add and remove the _xmlconsole contact like this:

add jabber _xmlconsole
remove _xmlconsole

Also, it will let you send raw XML to the server yourself. But be careful, if you send something invalid the server on the other end will probably disconnect you!

Other debugging

To get debug output, you have to launch BitlBee by hand instead of from the init script, with the BITLBEE_DEBUG=1 environment variable set. Also, you should pass some flags so it won't daemonise (and close stdout, stderr, etc.).

In short, something like this:

BITLBEE_DEBUG=1 bitlbee -Dnv

This may not be very useful, as not all protocols use this method of debugging. Good luck!

Again, be careful when sharing this output on the bug tracker/pastebin/etc as it may contain your password.

Libpurple

When using bitlbee-libpurple, you can't use daemon mode (-D), and using forkdaemon mode (-F) makes debugging difficult.

Using the BITLBEE_DEBUG=1 environment variable as mentioned in the previous section workarounds this, letting you use daemon mode with libpurple, but it will only work for the first connection from your irc client, and will abort if you try to connect more than once to the same bitlbee instace. Just restart it if you need more than one connection.

BitlBee Wiki: Debugging (last edited 2016-10-12 23:10:01 by dx)