Opened 6 years ago

Last modified 20 months ago

#30420 assigned Bug

Do not reload runserver during debugging / request processing

Reported by: Daniel Hahler Owned by: Rohith P R
Component: Core (Management commands) Version: dev
Severity: Normal Keywords:
Cc: Florian Apolloner Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no
Pull Requests:14597 unmerged, 11777 unmerged

Description

The server should not be restarted while debugging (pdb.set_trace()).

Use case:

  1. pdb.set_trace in the code
  2. trigger web request
  3. start debugging / messing around, maybe even use edit (via pdbpp) to edit files
  4. save something being watched

This ends up in garbarge on the screen, and the server process/thread getting killed.

This could be achieved using a thread lock.

See https://github.com/pallets/werkzeug/pull/1525/files for an example.

According to the ticket's flags, the next step(s) to move this issue forward are:

  • To provide a patch by sending a pull request. Claim the ticket when you start working so that someone else doesn't duplicate effort. Before sending a pull request, review your work against the patch review checklist. Check the "Has patch" flag on the ticket after sending a pull request and include a link to the pull request in the ticket comment when making that update. The usual format is: [https://github.com/django/django/pull/#### PR].

Change History (12)

comment:1 by Florian Apolloner, 6 years ago

Triage Stage: UnreviewedAccepted

This would indeed be nice to have and looks rather simple to implement. Do you want to submit a PR?

comment:2 by Daniel Hahler, 6 years ago

I'd do a PR only after some feedback on https://github.com/pallets/werkzeug/pull/1525.

comment:3 by Florian Apolloner, 6 years ago

Cc: Florian Apolloner added

comment:4 by Giovanni Totaro - aka Vanni, 6 years ago

Type: Cleanup/optimizationBug

Any update on this bug?

The server process gets killed even on a cold start (i. e. without any file reloading) when a line with import ipdb; ipdb.set_trace() is hit.

comment:5 by Florian Apolloner, 6 years ago

If there were an update the current comments would reflect that (usually at least). So the current status is: Patches welcome :)

comment:6 by Kim Namjun, 5 years ago

Has patch: set

comment:7 by Mariusz Felisiak, 5 years ago

Owner: changed from nobody to Kim Namjun
Patch needs improvement: set
Status: newassigned
Version: 2.2master

comment:8 by Rohith P R, 4 years ago

Owner: changed from Kim Namjun to Rohith P R

comment:9 by Rohith P R, 4 years ago

Patch needs improvement: unset

comment:10 by Mariusz Felisiak, 4 years ago

Patch needs improvement: set

comment:11 by Natalia Bidart, 20 months ago

Patch needs improvement: unset

comment:12 by Mariusz Felisiak, 20 months ago

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