This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: make pdb through separate terminal more convenient
Type: enhancement Stage: needs patch
Components: Library (Lib) Versions: Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Chiel92, r.david.murray, xdegaye
Priority: normal Keywords:

Created on 2013-12-24 15:09 by Chiel92, last changed 2022-04-11 14:57 by admin.

Messages (7)
msg206895 - (view) Author: Chiel ten Brinke (Chiel92) Date: 2013-12-24 15:09
There are several reasons why one would need to debug in a terminal window other than the debuggee terminal window, for instance when we have a curses application.
The pdb doesn't support a tty command like gdb, which would allow this.
Instead, it is possible to manually create a Pdb object with the stdin/stdout set to the terminal you want to use (e.g. /dev/pts/6). However, this is quite cumbersome, as command history, autocompletion etc don't work this way. Also, it seems that post mortem debugging cannot easily be done this way, like when running `python3.3 -m pdb myscript.py`. 

There should be an easy way to debug properly through a second terminal window.
msg206900 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-12-24 15:55
Sounds like a good idea to me, but it would be a new feature, not a bug fix.
msg206903 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-12-24 16:21
To clarify: remote debugging is not a new feature, but enabling command history &c should probably be considered a new feature, and making the interface for doing all this more convenient (which would be cool) certainly would be.
msg206904 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-12-24 16:22
Changing title to reflect the fact that it is an enhancement.
msg206905 - (view) Author: Chiel ten Brinke (Chiel92) Date: 2013-12-24 16:46
I called it a bug, because command history etc. works when debugging in a single terminal. It only fails when debugging remotely/in a separate terminal. But if this is not due to a improper implementation, it should indeed be an enhancement.
msg206906 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-12-24 16:53
Command line history (if I understand correctly) depends on the input/output being stdin/stdout, which isn't the case when doing remote debugging using the current implementation of remote debugging.
msg206907 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-12-24 16:54
Sorry, I mean stdin/stdout of the controlling terminal of the process.  Of course, I could be completely confused :)
History
Date User Action Args
2022-04-11 14:57:55adminsetgithub: 64260
2013-12-28 10:39:01xdegayesetnosy: + xdegaye
2013-12-24 16:54:36r.david.murraysetmessages: + msg206907
2013-12-24 16:53:17r.david.murraysetmessages: + msg206906
2013-12-24 16:46:10Chiel92setmessages: + msg206905
2013-12-24 16:22:18r.david.murraysetmessages: + msg206904
title: pdb through separate terminal not working properly -> make pdb through separate terminal more convenient
2013-12-24 16:21:04r.david.murraysetmessages: + msg206903
2013-12-24 15:55:49r.david.murraysettype: behavior -> enhancement
components: + Library (Lib)
versions: + Python 3.5, - Python 3.3
nosy: + r.david.murray

messages: + msg206900
stage: needs patch
2013-12-24 15:09:20Chiel92create