#15565 closed Uncategorized (fixed)
Runserver reloading breaks terminal STDIN when using pdb.set_trace()
Reported by: | Piotr Czachur | Owned by: | nobody |
---|---|---|---|
Component: | django-admin.py runserver | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | kmike84@… | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The issue is mentioned here: http://stackoverflow.com/questions/3259104/ipython-broken-shell-terminal-after-realoading-django
How to reproduce using Djano trunk, python2.7 and gnome-terminal:
- Start runserver
- Put pdb.set_trace() into your code (view, etc.)
- Make HTTP request
- You see debugger prompt
- Modify source, save. # runserver does reloading
- Make another HTTP request
- You see debugger prompt, but STDIN is invisible, so you cannot see what you type, which makes debugging a pain.
Attachments (1)
Change History (7)
comment:1 by , 14 years ago
Cc: | added |
---|
comment:2 by , 14 years ago
Triage Stage: | Unreviewed → Accepted |
---|
by , 14 years ago
Attachment: | restart.diff added |
---|
comment:3 by , 14 years ago
comment:6 by , 6 years ago
Easy pickings: | unset |
---|---|
Severity: | → Normal |
Type: | → Uncategorized |
UI/UX: | unset |
Please see https://github.com/django/django/pull/11291 / #30416 for an improved version.
Note:
See TracTickets
for help on using tickets.
I don't understand how/where the terminal is getting set to not echo input, so attached patch is a bit of a band-aid that ensure echo is on when the reloader thread starts. Anyone got a better idea?