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 enhancement up/down traversals
Type: enhancement Stage:
Components: Demos and Tools Versions: Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, georg.brandl, vandyswa
Priority: normal Keywords: patch

Created on 2010-06-23 19:21 by vandyswa, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pdb_up.pat vandyswa, 2010-06-23 19:21 Patch for PDB up/down
pdb_up.patch vandyswa, 2010-06-24 14:34
pdb_up2.patch vandyswa, 2010-06-24 15:30
pdb_up3.patch vandyswa, 2010-06-24 15:31
Messages (7)
msg108476 - (view) Author: Andrew Valencia (vandyswa) Date: 2010-06-23 19:21
In very deep stack traces (like runaway recursion) it can be a pain to get up to the top of the stack to see what kicked it off.  I've enhanced up/down to take a numeric argument for the number of positions to traverse, or -1 to go to the top/bottom.  Sample patch included.
msg108511 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2010-06-24 12:59
This is a good idea, but tab characters are disallowed in core python code; please replace them with spaces.
Then, please provide an "unified" diff patch (with "diff -u"), and name it with the ".patch" extension, this will make it easier to read.
msg108512 - (view) Author: Andrew Valencia (vandyswa) Date: 2010-06-24 14:34
Here's the patch, hopefully updated as requested.  Thanks!
msg108515 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2010-06-24 14:54
Two remarks:
- when int(arg) fails, an error message should be printed, like with the function do_commmands().
- the "for" loop seems unnecessary, something like "self.curindex -= nup" should be enough
msg108522 - (view) Author: Andrew Valencia (vandyswa) Date: 2010-06-24 15:30
Debugging tools which have bugs are a real pain... thanks for your comments and attention.  Here's another try.  With all the loop baggage gone the argument handling really called for factoring out.
msg108523 - (view) Author: Andrew Valencia (vandyswa) Date: 2010-06-24 15:31
My bad (new editor session lost the tab setting).  Please consider this one with no tabs instead.
msg108779 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-06-27 10:38
Committed a slightly different patch in r82263.  Thanks for the idea!
History
Date User Action Args
2022-04-11 14:57:02adminsetgithub: 53310
2010-06-27 10:38:06georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg108779

resolution: accepted
2010-06-24 15:31:51vandyswasetfiles: + pdb_up3.patch

messages: + msg108523
2010-06-24 15:30:02vandyswasetfiles: + pdb_up2.patch

messages: + msg108522
2010-06-24 14:54:01amaury.forgeotdarcsetmessages: + msg108515
2010-06-24 14:34:42vandyswasetfiles: + pdb_up.patch
keywords: + patch
messages: + msg108512
2010-06-24 12:59:38amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg108511
2010-06-23 19:21:25vandyswacreate