[ python-Bugs-1437051 ] "continue" in .pdbrc has no effect
SourceForge.net
noreply at sourceforge.net
Sun Jun 18 23:09:20 CEST 2006
Bugs item #1437051, was opened at 2006-02-22 14:13
Message generated for change (Comment added) made by isandler
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1437051&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Coolheads Consulting (coolheads)
Assigned to: Nobody/Anonymous (nobody)
Summary: "continue" in .pdbrc has no effect
Initial Comment:
I'm using Python 2.4.2 under Debian Woody; uname -a:
Linux bruno 2.4.23 i686 GNU/Linux
The documentation for pdb says that commands in .pdbrc
will be executed just as if they were typed in at the
pdb prompt. However, "c", "cont", and "continue" have
no effect. It would be nice if this would work.
I discovered this problem because I need to be able to
call Python scripts from within a Makefile, and it is
convenient, when one of them goes awry (say, because of
a key error exception), to already be in the debugger
when such exceptions are raised. However, I can't call
a Python script with the debugger from a makefile because
execution always stops at the beginning of the script,
waiting for a "continue" to be typed in at the prompt.
I thought I could solve the problem with a "continue"
in the .pdbrc in the local directory. However, every way I
can think of to say "continue", including aliasing it,
has no effect in the .pdbrc. Is there another way to
accomplish what I'm trying to do?
Steve Newcomb
srn at coolheads.com
----------------------------------------------------------------------
Comment By: Ilya Sandler (isandler)
Date: 2006-06-18 14:09
Message:
Logged In: YES
user_id=971153
The problem is limited to step/next/continue...
"l", "break", etc do work.
As far as I can tell the following is happening
1. .pdbrc is read (but not executed!) on pdb startup
2. it's executed when pdb first time enters the interaction()
3. if rc file contains, "continue", then do_continue() IS
executed but it has no effect, because pdb's interaction()
does not return and simply proceeds with user's input..
(do_continue()/do_next()/do_step() work by setting up a
stopping condition and returning to interpreter)
The problem can be fixed by having execRcLines check every
command's return status and returning as soon as any command
returns 1.. Of course, the rest of rclines would need to be
executed later...
For the record, gdb's .gdbinit files do allow commands like
"run"/"continue"/etc
If there is any interest in this fix, I can submit a patch
----------------------------------------------------------------------
Comment By: Terry J. Reedy (tjreedy)
Date: 2006-03-05 18:00
Message:
Logged In: YES
user_id=593130
I wonder whether the .pdbrc is being read and executed
when you think it is. Is the problem actually specific
to 'continue'? If you put 'list' in the file, do you get
a listing?
It might help if you gave the exact command line you use
to start the Python script.
I don't know if this is really a bug. You might get
answers about 'another way' on python-
list/comp.lang.python. (I don't know ;-)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1437051&group_id=5470
More information about the Python-bugs-list
mailing list