tkbe

June 25, 2008

django :: Debugging nirvana with werkzeug

Filed under: django — tb @ 11:27 am

I’ve previously written about my delight at the Django error pages. Well, I’ve found something even better: the Werkzeug Debugger! It’s developed by the Pocoo Team, which has also given us Pygments (the python code hi-liter that seems to be used everywhere lately), Jinja (the Django style template library used by Sphinx), and several others that I haven’t had the time to investigate yet.

Why is the Werkzeug Debugger so good? It is because it seems to integrate perfectly with Django, and it gives you a command prompt right there in your browser window, giving you the freedom to investigate the program state at that stackframe. Pure technogasm material! It also gives you the entire contents of the file, with the current function and the offending line highlit. And finally, you can view just the traceback (and supposedlyu automatically paste it to the lodgeit pastebin — I didn’t get that to work).

To install simply

easy_install werkzeug

then use the 12-line script found here to run your local django server (instead of python manage.py runserver).

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WordPress