From bbcc5358e905a0dc0100607bb5011008b2127e48 Mon Sep 17 00:00:00 2001
From: Gaston Dombiak
Date: Fri, 12 Mar 2004 03:46:16 +0000
Subject: [PATCH] Updates the document with information about the new debugger
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2248 b35dd754-fafc-0310-a699-88a17e54d16e
---
documentation/debugging.html | 87 ++++++++++++++++++++++++++++--------
1 file changed, 68 insertions(+), 19 deletions(-)
diff --git a/documentation/debugging.html b/documentation/debugging.html
index 907884631..b96a83602 100644
--- a/documentation/debugging.html
+++ b/documentation/debugging.html
@@ -15,32 +15,17 @@ Debugging with Smack
-Smack includes a built-in debugging console that will let you track all XML traffic between
-the client and server.
+Smack includes two built-in debugging consoles that will let you track all XML traffic between
+the client and server. A lite debugger which is part of the smack.jar
+and an enhanced debugger contained in smackx-debug.jar.
-
-When debugging mode is enabled, a debug window will appear when each new connection is created.
-The window will contain the following information:
-
-
-
-
-
- - Client Traffic (red text) -- raw XML traffic generated by Smack and sent to the server.
-
- Server Traffic (blue text) -- raw XML traffic sent by the server to the client.
-
- Interpreted Packets (green text) -- shows XML packets from the server as parsed by Smack.
-
-
-Right click on any of the panes to bring up a menu with the choices to copy of the contents
-to the system clipboard or to clear the contents of the pane.
-
Debugging mode can be enabled in two different ways:
- - Add the following line of code before creating new connections:
+
- Add the following line of code before creating new connections:
XMPPConnection.DEBUG_ENABLED = true;
- Set the Java system property smack.debugEnabled to true. The
@@ -57,6 +42,70 @@ add the following line to your application before opening new connections:
XMPPConnection.DEBUG_ENABLED = false;
+
+Smack uses the following logic to decide the debugger console to use:
+
+
+
+ - It will first try use the debugger class specified in the Java system property
+ smack.debuggerClass. This is a good place if you want to hook your own
+ debugger console. If you need to develop your own debugger all you need to do is
+ implement the SmackDebugger interface and then set the system property
+ on the command line such as:
+ java -Dsmack.debuggerClass=my.company.com.MyDebugger SomeApp
+
+
- If step 1 fails then the next option is to try to use the enhanced debugger. The
+ file smackx-debug.jar contains the enhanced debugger. Therefore you will need
+ to place the jar file in the classpath. For situations where space is an issue you
+ may want to only deploy smack.jar in which case the enhanced debugger won't be
+ available.
+
+
- The last option if the previous two steps fail is to use the lite debugger. The lite
+ debugger is a very good option for situations where you need to have low memory footprint.
+
+
+
+
+When debugging mode is enabled, a debug window will appear containing tabs for each new created connection.
+The window will contain the following information:
+
+
+
+
+ - Connection tabs -- each tab shows debugging information related to the connection.
+
- Smack info tab -- shows information about Smack (e.g. Smack version, installed components, etc.).
+
+
+The connection tab will contain the following information:
+
+ - All Packets -- shows sent and received packets information parsed by Smack.
+
- Raw Sent Packets -- raw XML traffic generated by Smack and sent to the server.
+
- Raw Received Packets -- raw XML traffic sent by the server to the client.
+
- Ad-hoc message -- allows to send ad-hoc packets of any type.
+
- Information -- shows connection state and statistics.
+
+
+
+
+When debugging mode is enabled, a debug window will appear when each new connection is created.
+The window will contain the following information:
+
+
+
+
+
+ - Client Traffic (red text) -- raw XML traffic generated by Smack and sent to the server.
+
- Server Traffic (blue text) -- raw XML traffic sent by the server to the client.
+
- Interpreted Packets (green text) -- shows XML packets from the server as parsed by Smack.
+
+
+Right click on any of the panes to bring up a menu with the choices to copy of the contents
+to the system clipboard or to clear the contents of the pane.
+