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.

Title: Add restart debugger command to
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, georg.brandl, isandler, rockyb
Priority: normal Keywords: patch

Created on 2005-12-30 15:14 by rockyb, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
pdb-add-restart.diff rockyb, 2006-01-02 11:30 Patch to add "run" or "restart" to
Messages (8)
msg49240 - (view) Author: Rocky Bernstein (rockyb) Date: 2005-12-30 15:14
The enclosed patch adds a restart command to pdb. (The
short command name is "R" as it is in perldb). With an
optional argument, the program arguments are reassigned.
msg49241 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-01-20 21:44
Logged In: YES 

Patch looks good from my POV.
msg49242 - (view) Author: Ilya Sandler (isandler) Date: 2006-02-02 04:40
Logged In: YES 

The patch works for me. I think the feature is desirable.
msg49243 - (view) Author: Ilya Sandler (isandler) Date: 2006-02-02 04:51
Logged In: YES 

one suggestion though: do we really need 'restart' alias?

The main problem is that gdb uses "restart" for a very
different purpose (restarting  a program from a known
state)..And we probably shouldn't deviate from gdb's command
set unless we have to.

Also I think we should not pollute the command space without
a real need...(a similar argument could be made agaist "ru"
abbreviation as well, but it's of lesser importance)
msg49244 - (view) Author: Rocky Bernstein (rockyb) Date: 2006-06-08 08:06
Logged In: YES 

Sorry for not responding earlier. As getting this was taking
a bit of time moving forward, in the interrum I had been
making much faster progress by splitting this off into it's
own little project under the bash debugger project I have on
sourceforge ( 

Being able to make public releases earlier and oftener has
offorded the oppertunity to move much further along much
quicker than via the patch method (where we still haven't
gotten past restarting the debugger).

Now back to your comments/questions. In pydb, there are two
kinds of "restart". "run" is like gdb's run. Debugger state
(breakpoints, watchpoints, display expressions, debugger
settings for list size, etc.) are preserved. Same as in gdb.

Gdb does not to my knowledge have a command called
"restart". However I've taken your suggestion of not having
a "restart" be the same thing as "run". "restart" is a
re-exec of the debugger. No state is save. As a debugger
writer, I personally find that one useful ;-)

Having the R be an alias for "run" is helpful since it's
short and matches what's used Perl where people use the
debugger more frequently. In fact there's a whole book
written on the Perl debugger. (And I also use 'R' in the GNU
Make and bash debuggers.)

As for "ru", well, since I've added command completion, I
feel this issue is less important.
msg49245 - (view) Author: Ilya Sandler (isandler) Date: 2006-06-18 19:36
Logged In: YES 

For the record:

gdb does have a "restart" command
(it's used to restart from a particular checkpoint)

msg49246 - (view) Author: Rocky Bernstein (rockyb) Date: 2006-06-18 20:46
Logged In: YES 

Tried on both GNu/Linux and NetBSD:

Undefined command: "restart".  Try "help".
(gdb) show version
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public
License, and you are
welcome to change it and/or distribute copies of it under
certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show
warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
(gdb) info checkpoint
Undefined info command: "checkpoint".  Try "help info".
msg49247 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-03-13 21:09
Committed and added docs in rev. 54360.
Date User Action Args
2022-04-11 14:56:14adminsetgithub: 42741
2005-12-30 15:14:29rockybcreate