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: Improve pdb breakpoint feedback
Type: enhancement Stage: test needed
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: ajaksu2, georg.brandl, kevinbutler
Priority: normal Keywords: easy, patch

Created on 2003-09-20 19:52 by kevinbutler, last changed 2022-04-10 16:11 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch_pdb.py kevinbutler, 2003-09-20 19:52 cvs diff -c of patch
Messages (5)
msg44666 - (view) Author: Kevin J. Butler (kevinbutler) Date: 2003-09-20 19:52
pdb was inconsistent in reporting changes to
breakpoints, reporting 'Deleted breakpoint #' in one
case, and not reporting the deletion in another.

This patch makes pdb consistently report
"Deleted/disabled/enabled breakpoint # at PATH:#"
for deleting, enabling, or disabling a breakpoint.

This makes it easier to integrate with IDEs such as
emacs gud mode (see discussion on python-dev startig
with
http://mail.python.org/pipermail/python-dev/2003-September/038147.html
).

Potential items for concern:

- I completely replaced the Bdb.get_break method.  It
was returning a boolean indicating if the breakpoint
existed or not, which appeared to be an error
(get_breaks returned the list of breakpoints).  The
method was never used in bdb.py or pdb.py, so I
replaced it with what I thought it should be.  :-) 
That is, it now returns the breakpoint instance
requested.  If there is a reason, I can easily make
this a new method
(get_breakpoint/get_breakpointinstance) rather than
replacing get_break.

- I've duplicated logic from Bdb.clear_bpbynumber into
a new method get_bpbynumber.  The logic differs only in
the return error messages or None.  This seemed the
simplest way to preserve the return value semantics
convention of the Bdb class.

- I'm also calling 'get', then 'clear' which does the
work of 'get' twice.  I did this to preserve the return
value conventions of Bdb and make the breakpoint info
available to the UI.  Shouldn't be a performance issue,
right?  ;-)

I believe this could go into 2.3.* and 2.4

msg81876 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-02-13 04:28
Closing proposed, objections?
msg85546 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-04-05 18:29
Why do you propose closing?
msg85577 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-04-05 22:13
I had already realized[1] (thanks John!) I had no good reason to suggest
closing this one, bit forgot to update the issue, sorry.

I think it was a knee-jerk reaction to a RFE that was open for six years
without a 'ditto', but agree it's a valid request.

[1] http://mail.python.org/pipermail/python-dev/2009-February/086210.html
msg112069 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-07-30 12:01
Thanks for the patch; I've committed a modified and extended version in r83275.
History
Date User Action Args
2022-04-10 16:11:15adminsetgithub: 39263
2010-07-30 12:01:54georg.brandlsetstatus: open -> closed
resolution: accepted
messages: + msg112069
2009-04-22 05:07:55ajaksu2setkeywords: + easy
2009-04-05 22:13:02ajaksu2setpriority: low -> normal

messages: + msg85577
2009-04-05 18:29:40georg.brandlsetnosy: + georg.brandl
messages: + msg85546
2009-02-13 04:28:08ajaksu2setversions: + Python 2.7, - Python 2.5
nosy: + ajaksu2
messages: + msg81876
priority: normal -> low
type: enhancement
stage: test needed
2003-09-20 19:52:13kevinbutlercreate