In this section we describe debugger commands which can be used when the debugger is run as a standalone program.
Most commands can be abbreviated to one or two letters; e.g., "h(elp)" means that either "h" or "help" can be used to enter the help command (but not "he", "hel", "H", "Help", or "HELP"). Arguments to commands must be separated by whitespace (spaces or tabs). Optional arguments are enclosed in square brackets ("[]") in the command syntax; the square brackets must not be typed. Alternatives in the command syntax are separated by a vertical bar ("|").
Entering a blank line repeats the last command entered. Exception: if the last command was a "list" command, the next 11 lines are listed.
Commands that the debugger doesn't recognize are assumed to be Python statements and are executed in the context of the program being debugged. Python statements can also be prefixed with an exclamation point ("!"). This may be a good way to inspect the program being debugged; it is even possible to change a variable or call a function. When an exception occurs in such a statement, the exception name is printed but the debugger's state is not changed.
The debugger supports aliases. Aliases can have parameters which allow a certain level of adaptability to the context under examination. See 1.2.10.
Debugger Prompt:
By default the debugger's prompt string is "(Pydb) " with
a trailing blank. Recursive invocations using the
"debug" command strip off the trailing blanks, add a layer of
parenthesis around the string, and add a trailing blank. For example,
for the default prompt the first debug invocation will be
"((Pydb)) ".
There's currently a bug in the code where specified trailing blanks are chopped. Furthermore the prompt may change in the future to add a history number. It is generally not advisable to change the prompt.
If you do need to change the prompt see 1.2.1.
Multiple commands may be entered on a single line, separated by ";;". (A single ";" is not used because it is the separator for multiple commands in a line that is passed to the Python parser.) No intelligence is applied to separating the commands; the input is split at the first ";;" pair, even if it is in the middle of a quoted string.