Skip to main content

A debug server for WSGI apps.

Project description

ohoh
====

|build-status| |license|


OhOh is a debugger for your WSGI applications. Using OhOh, you can inspect
the stack frames of a wsgi app that's thrown an exception.

Usage
-----

Use this command to serve your wsgi app in debug mode::

> ohoh "package.module:wsgi_app" -s localost:5000

For a full range of options, see ``ohoh -h``

OhOh provides a plug-in for the ``httpie`` utility. You can install ``httpie``
using ``pip install httpie``. Once you send a request that results in an
exception, you will enter the debugger automatically::

> http localhost:5000
HTTP/1.0 500 Internal Server Error
Date: Fri, 24 Jul 2015 23:41:20 GMT
Server: WSGIServer/0.2 CPython/3.4.2
Content-Type: text/plain; charset=utf-8
OhOh-Debug-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1N [Truncated (5061 chars) ...]
Location: http://localhost:5000/ohoh-debug/
Content-Length: 454

Traceback (most recent call last):
File "c:\dev\ohoh\build\lib\ohoh\middleware.py", line 57, in __call__
return self._app(environ, start_response)
File "tests\mock_app.py", line 6, in simple_err_app
path.join("foo bar", 475564)
File "C:\Python34\lib\ntpath.py", line 110, in join
p_drive, p_path = splitdrive(p)
File "C:\Python34\lib\ntpath.py", line 159, in splitdrive
if len(p) > 1:
TypeError: object of type 'int' has no len()
OhOh Interactive Debugger v0.1.dev28+n8ec9121
(odb) up
> c:\python34\lib\ntpath.py(110)join()
-> p_drive, p_path = splitdrive(p)
(odb)


Commands
--------

The following commands are supported by the command interpreter
(you can type ``help`` at the debugger prompt for online help with commands):

+-------------------+-----------------------------------------------------------+
+ Command | Description +
+===================+===========================================================+
+ **Client commands** +
+-------------------+-----------------------------------------------------------+
+ quit | Exit the debugger. +
+-------------------+-----------------------------------------------------------+
+ token | View the current debug server token. +
+-------------------+-----------------------------------------------------------+
+ url | View or set the url to which debug requests are sent. +
+-------------------+-----------------------------------------------------------+
+ version | View the version number of the debugger. +
+-------------------+-----------------------------------------------------------+
+ **Debug commands** +
+-------------------+-----------------------------------------------------------+
+ ! | Execute a one-line statement in the current context. +
+-------------------+-----------------------------------------------------------+
+ args | Print the argument list to the current function. +
+-------------------+-----------------------------------------------------------+
+ p | Print the value of an expression. +
+-------------------+-----------------------------------------------------------+
+ pp | Pretty print the value of an expression. +
+-------------------+-----------------------------------------------------------+
+ where | Print the stack trace, with the most recent call last. +
+-------------------+-----------------------------------------------------------+
+ up | Move up one frame in the stack. +
+-------------------+-----------------------------------------------------------+
+ down | Move down one frame in the stack. +
+-------------------+-----------------------------------------------------------+


.. |build-status| image:: https://travis-ci.org/te-je/ohoh.svg?branch=develop
:target: https://travis-ci.org/te-je/ohoh
:alt: build status
:scale: 100%

.. |license| image:: https://img.shields.io/badge/license-MIT-blue.svg
:target: https://raw.githubusercontent.com/te-je/ohoh/develop/LICENSE.txt
:alt: License
:scale: 100%

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

ohoh-0.1.0.zip (23.4 kB view details)

Uploaded Source

ohoh-0.1.0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distributions

ohoh-0.1.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

ohoh-0.1.0-py2-none-any.whl (14.9 kB view details)

Uploaded Python 2

File details

Details for the file ohoh-0.1.0.zip.

File metadata

  • Download URL: ohoh-0.1.0.zip
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ohoh-0.1.0.zip
Algorithm Hash digest
SHA256 115c7e34d6782388174b2859043746729753c50272b1ac31520cb0dcdf9a8469
MD5 84824889c016a2649db4ced200158e4b
BLAKE2b-256 8ad421f94837a8af351e0968bdbcbe62c68a470af42ea826600e069edd9b1a06

See more details on using hashes here.

File details

Details for the file ohoh-0.1.0.tar.gz.

File metadata

  • Download URL: ohoh-0.1.0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ohoh-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5662fc24db80a57fd68a43e9670dbd8b5bae62754ca5592fb93f24c781b9e954
MD5 e39c072838530af343638dd8688bc2fc
BLAKE2b-256 876d116633ff375b3ff1dc187a8fbb247aff141d48286c24e9d4f128ea528dd8

See more details on using hashes here.

File details

Details for the file ohoh-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ohoh-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c373201003b0acd992d419332508d65da7099cf1c03b45a51448e9aeb2280e5
MD5 146f0fd1c509182d45dd6e2bcab8645a
BLAKE2b-256 9d335f264d42a5d993513ea708e4bd41bf13a49d3ab30ca78e0a6e66a7d089ab

See more details on using hashes here.

File details

Details for the file ohoh-0.1.0-py2-none-any.whl.

File metadata

File hashes

Hashes for ohoh-0.1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 781779103da3501874977ce575e60d2346c677840f14f77f72d5baf063e205d8
MD5 aad94140e37db25bd104936b80271289
BLAKE2b-256 4c9cf188a7d88993d2c8635117559db8b874291c63d61fb055efcb7d8ee41046

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page