[IMP] developer reference: update t-debug doc

The value of `t-debug` is now optional, and leaving it out means the
directive just invokes the `breakpoint` builtin, which was added in
3.7 and is configurable via an envvar or a hook callable.

closes odoo/documentation#5800

Related: odoo/odoo#134842
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
Xavier Morel 2023-09-11 07:50:42 +02:00
parent 38b50bb081
commit 2e595b52b4

View File

@ -1,4 +1,3 @@
.. highlight:: xml
.. _reference/qweb:
@ -439,12 +438,12 @@ Debugging
.. rst-class:: o-definition-list
``t-debug``
invokes a debugger using PDB's ``set_trace`` API. The parameter should
be the name of a module, on which a ``set_trace`` method is called::
with an empty value, invokes the :func:`breakpoint` builtin
function, which usually invokes a debugger (:mod:`pdb` by
default).
<t t-debug="pdb"/>
is equivalent to ``importlib.import_module("pdb").set_trace()``
The behaviour can be configured via :envvar:`PYTHONBREAKPOINT` or
:func:`sys.breakpointhook`.
Rendering cache:
----------------