Pyramid Debugtoolbar is a package that provides an interactive HTML debugger for Pyramid application development. It offers various panels to inspect requests, responses, SQL queries, templates, and more, significantly aiding in development and debugging. The library is actively maintained, with its latest version 4.12.1 released in February 2024.
pip install pyramid-debugtoolbarVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to integrate `pyramid_debugtoolbar` into a minimal Pyramid application. The toolbar is enabled by calling `config.include('pyramid_debugtoolbar')` during application setup. Once running, visit `http://localhost:6543` and click the Pyramid logo in the upper right to access debugging information. Alternatively, you can activate it by adding `pyramid_debugtoolbar` to the `pyramid.includes` setting in your application's `.ini` file.
Upgrade `pyramid_debugtoolbar` to version 1.0.8 or later when using Pyramid 1.5a2+ (e.g., `pip install 'pyramid_debugtoolbar>=1.0.8'`).
Ensure `pyramid_debugtoolbar` is only included or activated in development/staging environments, typically by managing `pyramid.includes` in environment-specific `.ini` files.
Consider disabling the toolbar or specific panels for memory-intensive operations. The `debugtoolbar.exclude_routes` or `debugtoolbar.exclude_prefixes` settings can prevent data collection for certain paths.
You may need to explicitly configure `request.static_url` in your application to force HTTPS, or ensure your proxy/load balancer correctly rewrites schemes for static assets. A workaround involves patching `URLMethodsMixin.static_url` to inject `_scheme='https'` for all static URLs.