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: pdb: Allow the "list" command to return to the currently debugged line
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.2
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, dclemente, georg.brandl, r.david.murray
Priority: normal Keywords: patch

Created on 2008-10-22 21:07 by dclemente, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pdb_list_refocus.patch dclemente, 2008-10-22 21:07 Patch to merge
Messages (4)
msg75108 - (view) Author: Daniel Clemente Laboreo (dclemente) Date: 2008-10-22 21:07
The attached patch against today's trunk adds a new option to the "list"
("l") command of the debugger (pdb): "l ."

"l" starts showing the portion of code which contains the current line.
Further calls to "l" show the code below that. I found that I needed a
way to see the original line again. Manually I'd do "w" to see the
current line number and then "l 123" or so.
The new command "l ." brings you again to the code portion that was
shown first time, so this is automatic and faster.

I have absolutely no preference for the syntax "."; please change it if
something else would be more mnemonic or consistent.

Since this is my first patch; please complain if I do something wrong.
msg109596 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-07-08 20:34
Even if the patch is acceptable it would need to be updated for Python 3.2.
msg110210 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-07-13 16:14
I think this sounds like a reasonable suggestion.  Adding Georg to nosy since he seems to have had the most interest in pdb features according to the svn log ;)
msg112044 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-07-30 07:16
Implemented in r83260.  Thanks for the patch!
History
Date User Action Args
2022-04-11 14:56:40adminsetgithub: 48429
2010-07-30 07:16:49georg.brandlsetstatus: open -> closed
resolution: accepted
messages: + msg112044
2010-07-13 16:14:26r.david.murraysetnosy: + georg.brandl, r.david.murray
messages: + msg110210
2010-07-08 20:34:18BreamoreBoysetnosy: + BreamoreBoy

messages: + msg109596
versions: + Python 3.2
2008-10-22 21:07:33dclementecreate