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
_______________________________________________ Python-nl mailing list Python-nl@python.org http://mail.python.org/mailman/listinfo/python-nl