Opened 14 years ago

Closed 14 years ago

Last modified 6 years ago

#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:

  1. Start runserver
  2. Put pdb.set_trace() into your code (view, etc.)
  3. Make HTTP request
  4. You see debugger prompt
  5. Modify source, save. # runserver does reloading
  6. Make another HTTP request
  7. You see debugger prompt, but STDIN is invisible, so you cannot see what you type, which makes debugging a pain.

Attachments (1)

restart.diff (811 bytes ) - added by Karen Tracey 14 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by Mikhail Korobov, 14 years ago

Cc: kmike84@… added

comment:2 by Karen Tracey, 14 years ago

Triage Stage: UnreviewedAccepted

by Karen Tracey, 14 years ago

Attachment: restart.diff added

comment:3 by Karen Tracey, 14 years ago

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?

comment:4 by Karen Tracey, 14 years ago

Resolution: fixed
Status: newclosed

In [15883]:

Fixed #15565: Ensure terminal echo is on after reloader reloads (something turns it off on some systems if reload happens while at a pdb prompt). Thanks for the report zimnyx.

comment:5 by Karen Tracey, 14 years ago

In [15884]:

[1.2.X] Fixed #15565: Ensure terminal echo is on after reloader reloads (something turns it off on some systems if reload happens while at a pdb prompt). Thanks for the report zimnyx.

r15883 from trunk.

comment:6 by Daniel Hahler, 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.
Back to Top