Commit 84f9d5cf authored by JC Brand's avatar JC Brand

Mention in docs that you can enable debugging via URL

parent 3c988240
...@@ -591,6 +591,8 @@ a chat state indication of ``active`` will be sent out. ...@@ -591,6 +591,8 @@ a chat state indication of ``active`` will be sent out.
A value of ``0`` means that this feature is disabled. A value of ``0`` means that this feature is disabled.
.. _`debug`:
debug debug
----- -----
......
...@@ -9,21 +9,40 @@ Troubleshooting and debugging ...@@ -9,21 +9,40 @@ Troubleshooting and debugging
General tips on debugging Converse General tips on debugging Converse
================================== ==================================
When debugging Converse, always make sure that you pass in ``debug: true`` to Enabling debug output
the ``converse.initialize`` call. ---------------------
Converse will then log debug information to the browser's developer console. Converse has a :ref:`debug` configuration setting which lets you to turn on
Open the developer console and study the data that is logged to it. debug logging in the browser's developer console.
`Strope.js <http://strophe.im/>`_ the underlying XMPP library which Converse When debugging, you always want to make sure that this setting is set to
uses, swallows errors, so that messaging can continue in cases where ``true`` when calling ``converse.initialize``.
You can also enable debug output via the URL, which is useful when you don't
have access to the server where Converse is hosted.
To do so, add ``#converse?debug=true`` to the URL in the browser's address bar.
Make sure to first remove any already existing URL fragment (the URL fragment
is the part that starts with a ``#``).
With debug mode on, you can open the browser's developer console and study the
data that is logged to it.
In Chrome you can right click in the developer console and save its contents to
a file for later study.
What is logged in debug mode?
-----------------------------
`Strope.js <http://strophe.im/>`_, the underlying XMPP library which Converse
uses, swallows errors so that messaging can continue in cases where
non-critical errors occur. non-critical errors occur.
This is a useful feature and provides more stability, but it makes debugging This is a useful feature and provides more stability, but it makes debugging
trickier, because the app doesn't crash when something goes wrong somewhere. trickier, because the app doesn't crash when something goes wrong somewhere.
That's why checking the debug output in the browser console is so important. If That's why checking the debug output in the browser console is important.
something goes wrong somewhere, the error will be logged there and you'll be If something goes wrong somewhere, the error will be logged there and you'll be
able to see it. able to see it.
Additionally, Converse will in debug mode also log all XMPP stanzas Additionally, Converse will in debug mode also log all XMPP stanzas
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment