[ python-Bugs-926369 ] pdb sometimes sets breakpoints in the wrong location

SourceForge.net noreply at sourceforge.net
Mon Aug 30 15:38:03 CEST 2004


Bugs item #926369, was opened at 2004-03-31 02:22
Message generated for change (Comment added) made by jlgijsbers
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=926369&group_id=5470

Category: Python Library
Group: Python 2.4
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Ilya Sandler (isandler)
>Assigned to: Johannes Gijsbers (jlgijsbers)
Summary: pdb sometimes sets breakpoints in the wrong location

Initial Comment:

If one attempts to set a breakpoint in one line function:
e.g for this code:

def f(x): return x*x

z=23

pdb silently sets a breakpoint on the line right after
the function definition (i.e. outside the function body!):

../python pdb.py.v1.66 pdb_one_line_func 
> <string>(1)?()
(Pdb) b f
Breakpoint 1   /src/Lib/pdb_one_line_func:3
(Pdb) c
> /src/Lib/pdb_one_line_func(3)?()
-> z=23

It's probably acceptable to limit pdb breakpoints to
multiline functions, but i don't think, it's acceptable
to create wrong breakpoints.

Note: that anyone attempting to fix this should also
take a look at bug 875404 (global statment causes
breakpoints..), as both bugs are caused by
pdb.checkline() logic


----------------------------------------------------------------------

>Comment By: Johannes Gijsbers (jlgijsbers)
Date: 2004-08-30 15:38

Message:
Logged In: YES 
user_id=469548

Fixed by checking in patch 1003640.

----------------------------------------------------------------------

Comment By: Ilya Sandler (isandler)
Date: 2004-08-05 01:25

Message:
Logged In: YES 
user_id=971153

Patch 1003640 should fix this problem

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=926369&group_id=5470


More information about the Python-bugs-list mailing list