Working with pyramid-debugtoolbar

this is a work in progress documentation card, feel free to modify it

To activate pyramid-debugtoolbar on a cubicweb developpement, follow the instructions below:

In your environment install pyramid-debugtoolbar

pip install pyramid-debugtoolbar

Copy the following in pyramid-debug.ini in the same directory as your all-in-one.conf and pyramid.ini (etc/cubicweb.d/app/)

[main]
cubicweb.defaults = yes
cubicweb.auth.authtkt.session.secure = no
cubicweb.auth.authtkt.persistent.secure = no
cubicweb.session.secret = CHANGEME
cubicweb.auth.authtkt.session.secret = CHANGEME
cubicweb.auth.authtkt.persistent.secret = CHANGEME

cubicweb.debug = yes
cubicweb.bwcompat.errorhandler = no

pyramid.reload_templates = true
pyramid.debug_authorization = true
pyramid.debug_notfound = true
pyramid.debug_routematch = true
pyramid.default_locale_name = en
pyramid.includes =
   pyramid_debugtoolbar

Launch your pyramid instance in debug mode

cubicweb-ctl pyramid -D app

For this to work, at this date, you might need a recent versions of https://www.cubicweb.org/project/pyramid-cubicweb/ and https://www.cubicweb.org/project/cubicweb-pyramid

For more configuration options : http://docs.pylonsproject.org/projects/pyramid-debugtoolbar/en/latest/#settings

Tip : if running with a different IP than localhost, you might have to change debugtoolbar.hosts to match your incoming connexion's IP (for example in docker, or if your cubicweb is listening to your IP adrress). Careful : this gives a python shell access to the listed IPs, you might not want others to have access to all your files.