Skip to main content

A package which provides an interactive HTML debugger for Pyramid application development

Project description

pyramid_debugtoolbar provides a debug toolbar useful while you’re developing your Pyramid application.

This code requires Pyramid 1.2a1 or better.

Note that pyramid_debugtoolbar is a blatant rip-off of Michael van Tellingen’s flask-debugtoolbar (which itself was derived from Rob Hudson’s django-debugtoolbar). It also includes a lightly sanded down version of the Werkzeug debugger code by Armin Ronacher and team.


For a demonstration:

  • Create a virtualenv:

    $ virtualenv2.6 --no-site-packages env26
  • Clone the Pyramid trunk:

    $ git clone
  • Install the Pyramid trunk into the virtualenv:

    $ cd pyramid
    $ $VENV/bin/python develop
  • Clone the pyramid_debugtoolbar trunk:

    $ git clone
  • Install the pyramid_debugtoolbar trunk into the virtualenv:

    $ cd pyramid_debugtoolbar
    $ $VENV/bin/python develop
  • Install the pyramid_debugtoolbar/demo package into the virtualenv:

    $ cd demo
    $ $VENV/bin/python develop
  • Run the pyramid_debugtoolbar package’s demo/ file using the virtualenv’s Python:

    $ $VENV/bin/python

You will see a page full of test options to try when you visit http://localhost:8080.

1.0.4 (2013-01-05)

  • Add a debugtoolbar.excluded_prefixes setting. When a URL path prefix matches one of these prefixes, the toolbar will not be shown on the resulting page.
  • Show the prompt and little text file icons show all the time, instead of only on hover.
  • Do not set max-height on result boxes (which result in nested scroll on the page, which makes it hard to find information quickly).
  • When an expression result is long, do not truncate with an ellipsis, which requires one more click to get at the information I need.
  • Support pip install from the github repository by adding all static files required to install in the package_data Setuptools usually uses Subversion or CVS to tell it what static files it needs to package up for egg distribution, but does not support reading git metadata.
  • The debug toolbar now use a patched version of require.js with a distinct private name that cannot clash with the dojo loader or other incompatible versions of require that may already be loaded on the page. You no longer need to add the toolbar to your own require.js to make it work.

1.0.3 (2012-09-23)

  • The valid_host custom predicate used internally by pyramid_debugtoolbar views didn’t use newer “ipaddr”-based logic. Symptom: some views may have been incorrectly inaccessible if you used a network mask as a “debugtoolbar.hosts” option.
  • The debug console now works with Google App Engine.
  • The debug console now adds a shortcut for accessing the last result through _.

1.0.2 (2012-04-19)

  • Moved the toolbar and debugger javascript files to use requirejs for better dependency loading and module isolation to play better with mutiple library versions. Recurrent problem was with async loading and application specific jquery library where the expected version was overrided by the toolbar one.

    If you are already using requirejs and want the toolbar to load, just add it to your path and module:

      paths: {
        "jquery": "jquery-1.7.2.min",
        "toolbar": "/_debug_toolbar/static/js/toolbar"
    require(["jquery", "toolbar"], function($, toolbar) {
      $(function() {
        // your module

1.0.1 (2012-03-27)

  • If request.remote_addr is None, disable the toolbar.

1.0 (2012-03-17)

  • Don’t URL-quote SQL parameters on SQLAlchemy panel.
  • Allow hostmask values as debugtoolbar.hosts entries (e.g. (2012-02-22)

  • When used with Pyramid 1.3a9+, views, routes, and other registrations made by pyramid_debugtoolbar itself will not show up in the introspectables panel.

0.9.9 (2012-02-19)

  • Try to take advantage of MakoRendererFactoryHelper in Pyramid 1.3a8+. If we can do this, the toolbar templates won’t be effected by normal mako settings. The most visible change is that toolbar mako templates now have a dbtmako extension.

0.9.8 (2012-01-09)

  • Show request headers instead of mistakenly showing environ values in Headers panel under “Request Headers”. This also fixes a potential UnicodeDecodeError.
  • Set content_length on response object when we regenerate app_iter while replacing original content.

0.9.7 (2011-12-09)

  • The performance panel of the debugtoolbar used a variable named function_calls which was not initialised when stats are not collected. This caused a NameError when mako rendered the template with the strict_undefined option.
  • Fix Python 3 compatibility in SQLAlchemy panel.
  • Make SQLAlchemy explain and select work again.

0.9.6 (2011-12-09)

0.9.5 (2011-11-12)

  • Adjust tox setup to test older Pyramid and WebOb branches under 2.5.
  • Convert all templates to Mako.
  • Don’t rely on pyramid.compat.json.
  • Add Tweens toolbar panel.

0.9.4 (2011-09-28)

  • Upgrade to jquery 1.6.4 and tablesorter plugin 2.0.5b
  • Introduced new setting debugtoolbar.button_style. Which can be used to override the default style (top:30px) set by toolbar.css.
  • Compatible with Python 3.2 (requires Pyramid 1.3dev+).
  • Appease settings values that were sensitive to __getattr__ in the settings debug panel (e.g. MongoDB databases). See

0.9.3 (2011-09-12)

  • All debug toolbar panels and underlying views are now always executable by entirely anonymous users, regardless of the default permission that may be in effect (use the NO_PERMISSION_REQUIRED permission for all debugtoolbar views).
  • Toolbar cookie settings name changed (from fldt to p_dt), to avoid messing up folks who use both the flask debugtoolbar and Pyramid’s.
  • Fix IE7 and IE8 renderings of the toolbar.

0.9.2 (2011-09-05)

  • Log an exception body to the debug toolbar logger when an exception happens.
  • Don’t reset the root logger level to NOTSET in the logging panel (changes console logging output to sanity again).

0.9.1 (2011-08-30)

  • The debugtoolbar.intercept_exc setting is now a tri-state setting. It can be one of debug, display or false. debug means show the pretty traceback page with debugging controls. display means show the pretty traceback package but omit the debugging controls. false means don’t show the pretty traceback page. For backwards compatibility purposes, true means debug.
  • A URL is now logged to the console for each exception when debugtoolbar.intercept_exc is debug or display. This URL leads to a rendering of the “pretty” traceback page for an exception. This is useful when the exception was caused by an AJAX or non-human-driven request. This URL is also injected into the pretty traceback page (at the bottom).
  • “Unfixed” indentation of SQL EXPLAIN done in 0.9, it broke the explain page when a column value isn’t a string.

0.9 (2011-08-29)

  • Fixed indentation of SQL EXPLAIN by replacing spaces with HTML spaces.
  • response.charset in some undefined user-reported cases may be None, which would lead to an exception when attempting to render the debug toolbar. In such cases we now assume the charset is UTF-8.
  • Some renderings of the request vars and renderer values would raise an uncaught exception.

0.8 (2011-08-24)

  • Try to cope with braindead Debian Python installs which package the pstats module separately from Python for god only knows what reason. Turn the performance panel off in this case instead of crashing.

0.7 (2011-08-24)

  • Docs-only changes.

0.6 (2011-08-21)

  • Do not register an alias when registering an implicit tween factory (compat with future 1.2 release).

0.5 (2011-08-18)

0.4 (2011-08-18)

  • Change the default value for debugtoolbar.intercept_redirects to false. Rationale: it confuses people when first developing if the application they’re working on has a home page which does a redirection.

0.3 (2011-08-15)

  • Request vars panel would cause a UnicodeDecodeError under some circumstances (see
  • Dynamicize URLs for SQLAlchemy subpanels.
  • Require “pyramid>=1.2dev” for install; the trunk is now “1.2dev” instead of “1.1.1dev”.
  • Requires trunk after 2011-08-14: WSGIHTTPException “prepare” method and alias param to add_tween, BeforeRender event has no “_system” attr.
  • Fix memory leak.
  • HTML HTTP exceptions now are rendered with the debug toolbar div.
  • Added NotFound page to demo app and selenium tests.

0.2 (2011-08-07)

  • Add SQLAlchemy “explain” and “select” pages (available from the SQLALchemy panel next to each query shown in the page).
  • Requires newer Pyramid trunk (checked out on 2011-08-07 or later).
  • Add a link to the SQLAlchemy demo page from the demo app index page.

0.1 (2011-07-30)

  • Initial release.

Project details

Release history Release notifications

History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


This version
History Node


History Node


History Node


History Node


History Node


History Node

History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
pyramid_debugtoolbar-1.0.4.tar.gz (1.8 MB) Copy SHA256 hash SHA256 Source None Jan 5, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page