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.

Author richiehindle
Recipients
Date 2002-11-25.23:18:21
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
"Set Next Statement", aka "Jump", for Python debuggers.

For Python 2.3a0 on all platforms (built and tested in Win98).

This patch adds the ability for Python debuggers (including
pdb) to control which line of code in a frame will be executed
next.  This allows the user to jump back and execute code
again, or jump forward to skip code that he doesn't want to
run.  A debugger (or anything else that installs a trace
function) does this by setting the value of frame.f_lineno
from within a trace function.

There are some situations where you can't jump because it
would break the stack - these are caught and a ValueError
is raised.

There are other cases where the jump *is* possible but the
stack needs fixing up, and the code does that.

The patch includes:

 o A setter for frame.f_lineno, in frameobject.c
 o A new command 'j(ump) <line number>' for pdb.
 o Tests in test_trace.py for all the allowed and disallowed
   types of jumps.
 o Updated documentation for pdb and frame objects.

History
Date User Action Args
2007-08-23 15:18:33adminlinkissue643835 messages
2007-08-23 15:18:33admincreate