How do you debug a Django application?
Instruction: Describe the tools and techniques you use for debugging a Django application.
Context: This question tests the candidate's problem-solving skills and their familiarity with debugging tools and practices within the Django ecosystem.
Updated
Official answer available
Read the opening below, then unlock the full answer and practical guidance.
Start with the exact symptom, expected result, affected request and deployed version. Reproduce with the smallest safe case and separate application behavior from configuration, data, permissions, cache and external-service failures. Preserve useful request IDs and timestamps without copying credentials or private payloads into logs.
Read the traceback and structured logs, then test a specific hypothesis. For a slow page, measure SQL count/time, application work and rendering instead of assuming the database is responsible...