Debugger : Debugger Commands : HISTORY Command

HISTORY Command

The HISTORY command allows you to easily invoke any previously entered Debugger command. Each time the Debugger prompt appears, a sequential number is displayed. You can later use this number to reference the command entered at the prompt. To see the list of commands used in the session, perform the following:

Pdb > HISTORY

The Debugger then displays the most recently entered commands, up to a maximum of 20, with their reference numbers.

To re-enter a specific command, enter the following:

Pdb > !command_number

where command_number is the command reference number.

For example, if, in the course of the debugging session, you gave the command:

90 Pdb > SET CONDITION cstop := true

You could re-execute this command later by entering:

103 Pdb > !90

To re-enter the last performed command, enter:

Pdb > !!

Another way to execute a previous command is to enter:

Pdb > !text

where text is a text string uniquely matching a previously entered command.

For example, if, after the command number 90, no command starting with the letter “s” was given, then you can execute this command by entering:

Pdb > !s