#33723 closed New feature (needsinfo)

DEBUG_PROPAGATE_EXCEPTIONS is not honored by runserver

Reported by: Daniel Hahler Owned by: nobody
Component: Core (Management commands) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: yes
Easy pickings: no UI/UX: no


When setting DEBUG_PROPAGATE_EXCEPTIONS = True the exception gets re-raised in the view, but still gets handled/swallowed by runserver then.

Therefore python -m pdb ./manage.py runserver --nothreading --noreload does not allow for post-mortem debugging then.

This could be fixed by implementing handle_error on the WSGIServer and ServerHandler used by the runserver command.

Change History (1)

comment:1 Changed 16 months ago by Carlton Gibson

Has patch: set
Needs documentation: set
Needs tests: set
Patch needs improvement: set
Resolution: needsinfo
Status: newclosed

Hey Daniel. Interesting idea. I'm not sure of the benefit… maybe it's worth it, but I've always found setting a breakpoint in an erroring view to be sufficient. 🤔

Can I ask you to follow-up on the DevelopersMailingList to see what others think, and to canvas suggestions on the implementation (as it seems a bit first pass).

Just as a question: what happens with the handle_error() under normal usage if I have DEBUG_PROPAGATE_EXCEPTIONS set? (It seems like a probable can of worms…) 🤔

Note: See TracTickets for help on using tickets.
Back to Top