Code

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#15565 closed (fixed)

Runserver reloading breaks terminal STDIN when using pdb.set_trace()

Reported by: zimnyx Owned by: nobody
Component: django-admin.py runserver Version: master
Severity: Keywords:
Cc: kmike84@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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 kmtracey 3 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 3 years ago by kmike

  • Cc kmike84@… added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 3 years ago by kmtracey

  • Triage Stage changed from Unreviewed to Accepted

Changed 3 years ago by kmtracey

comment:3 Changed 3 years ago by kmtracey

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 Changed 3 years ago by kmtracey

  • Resolution set to fixed
  • Status changed from new to closed

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 Changed 3 years ago by kmtracey

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.