[Django] #33723: DEBUG_PROPAGATE_EXCEPTIONS is not honored by runserver

8 views
Skip to first unread message

Django

unread,
May 18, 2022, 9:02:52 AM5/18/22
to django-...@googlegroups.com
#33723: DEBUG_PROPAGATE_EXCEPTIONS is not honored by runserver
-------------------------------------+-------------------------------------
Reporter: Daniel | Owner: nobody
Hahler |
Type: New | Status: new
feature |
Component: Core | Version: dev
(Management commands) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/33723>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 25, 2022, 2:22:46 AM5/25/22
to django-...@googlegroups.com
#33723: DEBUG_PROPAGATE_EXCEPTIONS is not honored by runserver
-------------------------------------+-------------------------------------
Reporter: Daniel Hahler | Owner: nobody
Type: New feature | Status: closed
Component: Core (Management | Version: dev
commands) |
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* status: new => closed
* needs_better_patch: 0 => 1
* needs_tests: 0 => 1
* needs_docs: 0 => 1
* has_patch: 0 => 1
* resolution: => needsinfo


Comment:

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…) 🤔

--
Ticket URL: <https://code.djangoproject.com/ticket/33723#comment:1>

Reply all
Reply to author
Forward
0 new messages