2 messages in org.python.python-bugs-list[ python-Bugs-926807 ] pdb sometimes ...
FromSent OnAttachments
SourceForge.netMar 31, 2004 12:08 pm 
SourceForge.netMar 31, 2004 12:11 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[ python-Bugs-926807 ] pdb sometimes sets breakpoints in the wrong locationActions...
From:SourceForge.net (nore@sourceforge.net)
Date:Mar 31, 2004 12:08:46 pm
List:org.python.python-bugs-list

Bugs item #926807, was opened at 2004-03-31 09:09 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=926807&group_id=5470

Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: Ilya Sandler (isandler) Assigned to: Nobody/Anonymous (nobody) 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&#039;s probably acceptable to limit pdb breakpoints to multiline functions, but i don&#039;t think, it&#039;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

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