diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-07-09 20:49:52 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-07-09 20:49:52 +0000 |
commit | f8cdcb7711a55b9fe0e5982ff9775740dc9742c6 (patch) | |
tree | 6fcfe18ed24b74fd4ea58f2fbddbbee5bc1ec8ab /docs | |
parent | 1fe3cec7466655a1f7ba636f53af796c6c132f47 (diff) | |
parent | 177c566ecae8a20750aa80d081e681137f8f9d51 (diff) | |
download | pecan-f8cdcb7711a55b9fe0e5982ff9775740dc9742c6.tar.gz |
Merge "Replace pecan's homegrown interactive debugging middleware with backlash"
Diffstat (limited to 'docs')
-rw-r--r-- | docs/source/debug-middleware-1.png | bin | 55246 -> 0 bytes | |||
-rw-r--r-- | docs/source/debug-middleware-2.png | bin | 6767 -> 0 bytes | |||
-rw-r--r-- | docs/source/development.rst | 37 |
3 files changed, 9 insertions, 28 deletions
diff --git a/docs/source/debug-middleware-1.png b/docs/source/debug-middleware-1.png Binary files differdeleted file mode 100644 index 10c91b0..0000000 --- a/docs/source/debug-middleware-1.png +++ /dev/null diff --git a/docs/source/debug-middleware-2.png b/docs/source/debug-middleware-2.png Binary files differdeleted file mode 100644 index 1c187b8..0000000 --- a/docs/source/debug-middleware-2.png +++ /dev/null diff --git a/docs/source/development.rst b/docs/source/development.rst index db9bd84..76b2267 100644 --- a/docs/source/development.rst +++ b/docs/source/development.rst @@ -21,37 +21,18 @@ in your applications. To enable the debugging middleware, simply set the Once enabled, the middleware will automatically catch exceptions raised by your application and display the Python stack trace and WSGI environment in your -browser for easy debugging: +browser when runtime exceptions are raised. -.. figure:: debug-middleware-1.png - :alt: Pecan debug middleware sample output. - :width: 90% +To improve debugging, including support for an interactive browser-based +console, Pecan makes use of the Python `backlash +<https://pypi.python.org/pypi/backlash>` library. You’ll need to install it +for development use before continuing:: -To further aid in debugging, the middleware includes the ability to repeat the -offending request, automatically inserting a breakpoint, and dropping your -console into the Python debugger, ``pdb.post_mortem``: + $ pip install backlash + Downloading/unpacking backlash + ... + Successfully installed backlash -.. figure:: debug-middleware-2.png - :alt: Pecan debug middleware request debugger. - -You can also use any debugger with a suitable ``post_mortem`` entry point. -For example, to use the `PuDB Debugger <http://pypi.python.org/pypi/pudb>`_, -set ``debugger`` like so:: - - import pudb - - app = { - ... - 'debug': True, - 'debugger': pudb.post_mortem, - ... - } - -.. seealso:: - - Refer to the `pdb documentation - <http://docs.python.org/library/pdb.html>`_ for more information on - using the Python debugger. Serving Static Files -------------------- |