summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarian Beermann <public@enkore.de>2017-05-16 23:18:48 +0200
committerMarian Beermann <public@enkore.de>2017-05-16 23:30:44 +0200
commit054897c8724e1933d1ed3a1ec537046f30968e18 (patch)
treeb8d97ca00eee73553b959c9237ede7adc9162cc0
parent6d6ae65be3b88682bd86aaa900d9114859968104 (diff)
docs: debugging facilities
-rw-r--r--docs/usage.rst18
1 files changed, 16 insertions, 2 deletions
diff --git a/docs/usage.rst b/docs/usage.rst
index d2b0904a6..bde9a9955 100644
--- a/docs/usage.rst
+++ b/docs/usage.rst
@@ -505,8 +505,8 @@ Miscellaneous Help
.. include:: usage/help.rst.inc
-Debug Commands
---------------
+Debugging Facilities
+--------------------
There is a ``borg debug`` command that has some subcommands which are all
**not intended for normal use** and **potentially very dangerous** if used incorrectly.
@@ -525,6 +525,20 @@ They exist to improve debugging capabilities without direct system access, e.g.
in case you ever run into some severe malfunction. Use them only if you know
what you are doing or if a trusted |project_name| developer tells you what to do.
+Borg has a ``--debug-topic TOPIC`` option to enable specific debugging messages. Topics
+are generally not documented.
+
+A ``--debug-profile FILE`` option exists which writes a profile of the main program's
+execution to a file. The format of these files is not directly compatible with the
+Python profiling tools, since these use the "marshal" format, which is not intended
+to be secure (quoting the Python docs: "Never unmarshal data received from an untrusted
+or unauthenticated source.").
+
+The ``borg debug profile-convert`` command can be used to take a Borg profile and convert
+it to a profile file that is compatible with the Python tools.
+
+Additionally, if the filename specified for ``--debug-profile`` ends with ".pyprof" a
+Python compatible profile is generated. This is only intended for local use by developers.
Additional Notes
----------------