[New-bugs-announce] [issue1786] pdb should set stdin+stdout around exec call

Guido van Rossum report at bugs.python.org
Fri Jan 11 02:05:06 CET 2008

New submission from Guido van Rossum:

When you type a command in pdb that happens to print something, the
output goes to sys.stdout, even if self.stdout references another file.
 This makes it hard to debug code running inside a web server where
sys.stdout/stdout are connected to a socket (or a WSGI wrapper file);
the output "disappears" and ends up messing up the response.

Attached is a fix that temporarily changes sys.stdin/stdout to the
debugger's input and output.  What do people think of this?

components: Library (Lib)
files: pdb.diff
messages: 59686
nosy: gvanrossum
priority: low
severity: normal
status: open
title: pdb should set stdin+stdout around exec call
type: behavior
versions: Python 2.5, Python 2.6, Python 3.0
Added file: http://bugs.python.org/file9120/pdb.diff

Tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list