[python-nl] Debugging tactics
Tim Molendijk
tim at timmolendijk.nl
Mon Oct 5 15:45:34 CEST 2009
Hey all,
At the recent PUN in Amsterdam I did a short session on tactics for
debugging web apps in Python and Django, based on my personal experiences
from working on http://SmartPR.nl/. There was a lot of interesting input
from the audience, which I would like to share with you all here:
- print or logging
- the Python debugger (pdb) or its enhanced variant ipdb:
http://pypi.python.org/pypi/ipdb/0.1dev-r1716
- django-debug-toolbar; a Django app providing a feedback bar overlaying
your web app: http://github.com/robhudson/django-debug-toolbar
- Werkzeug's interactive debugger page:
http://werkzeug.pocoo.org/documentation/0.5.1/debug.html.
django-command-extensions (another Django app) provides a test server with
Werkzeug's debugger baked in:
http://code.google.com/p/django-command-extensions/
- Winpdb is an interactive debugger with a GUI, which can be attached to
a Python process. This means you can do live debugging on a web app that is
running exactly like it would be running in production. I've tried this
approach myself last week and it works pretty neat. It might be a bit of a
hassle to get Winpdb running, as it depends on wxPython, but on OS X I got
it working pretty quickly using MacPorts.
http://pypi.python.org/pypi/winpdb/1.3.8
- Pydev (Eclipse plugin): http://pydev.org/
- Then there were some tips for web app testing clients:
- Twill: http://pypi.python.org/pypi/twill/0.9
- zc.testbrowser: http://pypi.python.org/pypi/zc.testbrowser/1.0.0a5
- Selenium: http://seleniumhq.org/
To me the result of my lightning talk has already been extremely useful. I
hope it will do the same for some other people.
Cheers,
Tim
--
http://timmolendijk.nl • http://twitter.com/timmolendijk
------------- volgend deel ------------
Een HTML-bijlage is gescrubt...
URL: <http://mail.python.org/pipermail/python-nl/attachments/20091005/4e813c4c/attachment.htm>
More information about the Python-nl
mailing list