From d1f04bf33ed4e2b6f17bdc32784aa23c6dfd6a20 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Fri, 29 Sep 2023 10:53:41 +0200 Subject: Import wiki documentation from upstream Imported from: commit 2484d45a8abcb55e900de8538de6ec646992d682 (HEAD) Author: Marvin W Date: Fri Aug 19 14:41:11 2022 +0200 Destroyed _Footer (markdown) --- doc/DEBUGGING.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 doc/DEBUGGING.md (limited to 'doc/DEBUGGING.md') diff --git a/doc/DEBUGGING.md b/doc/DEBUGGING.md new file mode 100644 index 00000000..b1dc0fc0 --- /dev/null +++ b/doc/DEBUGGING.md @@ -0,0 +1,31 @@ +# Stack trace +If Dino crashes, a stack trace can be obtained by executing Dino within gdb. Make sure you have debug symbols installed. +``` +gdb dino +> r // Starts dino +[Do whatever makes Dino crash] +> bt // To obtain the stack trace +``` +To get traces of runtime criticals, use `gdb --args dino --g-fatal-warnings`. + +# Debug output +Additional output will be printed when setting the environment variable `G_MESSAGES_DEBUG`. Setting it to `all` will also print output from non-Dino components (Gtk, Glib, ...). + +`env G_MESSAGES_DEBUG=all dino` + +You can filter for which components debug output should be printed by replacing `all` with `libdino` and/or `OMEMO` + +`env G_MESSAGES_DEBUG=libdino,OMEMO dino` + + +# View XML stanzas +Starting `dino` with `--print-xmpp=[filter]` results in stanzas being printed to stdout. You can create complex filters to specify which stanzas should be printed. + +|`--print-xmpp=` | Result | +|------------------------------ | ----------- | +| `all` | All stanzas | +| `message` | Message stanzas | +| `message.body` | Message stanzas with a `body` child node | +| `message[to=jid@example.com]` | Message stanzas with the `to` attribute set to `jid@example.com` | +| `presence.{jabber:x:signed}:x` | Presence stanzas having a child node `x` with namespace `jabber:x:signed`| +| `message\|iq` | Message and Iq stanzas | -- cgit v1.2.3