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...
More recent articles
- Qwen2.5-Coder-32B is an LLM that can code well that runs on my Mac - 12th November 2024
- Visualizing local election results with Datasette, Observable and MapLibre GL - 9th November 2024
- Project: VERDAD - tracking misinformation in radio broadcasts using Gemini 1.5 - 7th November 2024