[Patches] [ python-Patches-1061767 ] fix for bug 1055168 (pdb not entering the right frame)

SourceForge.net noreply at sourceforge.net
Sun Nov 7 12:37:58 CET 2004


Patches item #1061767, was opened at 2004-11-07 05:26
Message generated for change (Comment added) made by jlgijsbers
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1061767&group_id=5470

Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Ilya Sandler (isandler)
Assigned to: Nobody/Anonymous (nobody)
Summary: fix for bug 1055168 (pdb not entering the right frame)

Initial Comment:
Bdb.set_trace()  assumed that the frame which needs to
be debugged is the caller's frame. This assumption
fails if Bdb_set_trace() is called from inside a
debugger (say from inside of a pdb's set_trace). So now
Bdb.set_trace() accepts an optional parameter
frame_to_debug which allows the caller to specify which
frame needs to be debugged, and pdb is modified to use it..

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

>Comment By: Johannes Gijsbers (jlgijsbers)
Date: 2004-11-07 12:37

Message:
Logged In: YES 
user_id=469548

That's normal: pdb can never list code that was input on a
console. A coworker of mine (Jeroen Vloothuis) and I
beautified the code a bit, and I checked it in as rev 1.73
of pdb.py and rev 1.47 of bdb.py. Thanks for the patch!

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

Comment By: Ilya Sandler (isandler)
Date: 2004-11-07 05:42

Message:
Logged In: YES 
user_id=971153


The original bug report gives an example where the code to
debug was specified from python's shell. I am not quite  how
pdb is supposed to behave in this case.. With the patch, it
does seem to enter in the right frame, but it can't list the
code.

The patch does work when the code comes from a file.
 
.def foo():
     import pdb 
     pdb.set_trace()
     print "tracing 1"
     print "tracing 2"
 foo()


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

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


More information about the Patches mailing list