Recently I learned about Werkzeug’s interactive debugger in combination of django_extensions to debug Django Python codes with ./manage.py runserver_plus.
But how do you debug inside the templates? If I were to add some gibberish like {{ yasdasdasf }} inside my template, then Django will silently ignore it. What’s more annoying is when you expect something to show up in the template, but it doesn’t because there is an error.
I think I read some solutions about using {{ debug }} inside templates or TEMPLATE_STRING_IF_INVALID inside settings.py, but that seems like a lot of “turn on and off” for everytime you want to debug or check something in a template.
You can make a crashing template filter:
So
{{ request|crash }}should raise an exception because crash_here is not defined, and you should be able to debug it in werkzeug.