diff --git a/doc/source/testing.rst b/doc/source/testing.rst index 82eca9d..7ea405a 100644 --- a/doc/source/testing.rst +++ b/doc/source/testing.rst @@ -83,6 +83,21 @@ By default, the functional tox job will use ``testr`` to execute the functional tests. +Debugging +--------- + +In order to be able to debug code in Castellan, you must use the Python +Debugger. This can be done by adding ``import pdb; pdb.set_trace()`` +to set the breakpoint. Then run the following command to hit the breakpoint: + +.. code-block:: bash + + # hit the pdb breakpoint + tox -e debug + +Once in the Python Debugger, you can use the commands as stated in the +`Debugger Commands` section here: https://docs.python.org/2/library/pdb.html + Pep8 Check ---------- diff --git a/tox.ini b/tox.ini index 6315e8c..1302a23 100644 --- a/tox.ini +++ b/tox.ini @@ -18,6 +18,9 @@ [testenv:venv] commands = {posargs} + +[testenv:debug] +commands = oslo_debug_helper {posargs} [testenv:cover] commands = python setup.py testr --coverage --testr-args='{posargs}'