Simon Willison’s Weblog

Subscribe

What is the best way to debug a Django app?

16th January 2011

My answer to What is the best way to debug a Django app? on Quora

The Django Debug Toolbar is essential: http://robhudson.github.com/djan...

Personally I quite like droppping “import pdb; pdb.set_trace()” in to a view function, hitting refresh in my browser and then using the interactive PDB terminal to step through my code. The browser just hangs waiting for the page to load until I hit “c” for continue, at which point it finishes loading.

Here are some notes I made for a talk I gave about debugging Django back in 2008: http://simonwillison.net/2008/Ma...

This is What is the best way to debug a Django app? by Simon Willison, posted on 16th January 2011.

Next: What are some recommendations for good social media and/or digital marketing conferences to attend in 2011?

Previous: Is there an online calendar for all the Ruby / Rails conferences to be held in 2011?

Monthly briefing

Sponsor me for $10/month and get a curated email digest of the month's most important LLM developments.

Pay me to send you less!

Sponsor & subscribe