Print value of expression expression each time the program stops. format may be used before expression as in the "print" command. format "i" or "s" or including a size-letter is allowed, and then expression is used to get the address to examine.
With no argument, display all currently requested auto-display expressions. Use "undisplay" to cancel display requests previously made.
Evaluate the expression in the current context and print its value. Note: "print" can also be used, but is not a debugger command--it executes the Python print statement.
Evaluate the expression in the current context and print its value. One can also often have an expression printed by just typing the expression. If the first token doesn't conflict with a debugger built-in command Python will, by default, print the result same as if you did this inside a Python interpreter shell. To make things even more confused, a special case of running an arbitrary Python command is the "print" command. But note that the debugger command is just "p".
So what's the difference? The debugger's print command encloses everything in a "repr()", to ensure the resulting output is not too long. Note: Should add info as to how to customize what ``too long'' means. So if you want abbreviated output, or are not sure if the expression may have an arbitrarily long (or infinite) representation, then use "p". If you want the output as Python would print it, just give the expression or possibly use python's "print" command.
Like the "p" command, except the value of the expression is pretty-printed using the pprint module.
Print the type of the expression, pretty-print its value and print it's class members value. For functions, methods, classes, and modules print out the documentation string if any. For functions also show the argument list.
The examine debugger command in Perl is the model here. Note that "x" is a short name for ``expression'' as it is in Perl's debugger.
Print just the type name of the expression.
Show all global variables. These variables are not just the variables
that a programs sees via a global
statement, but all of them
that can be accessible.
See About this document... for information on suggesting changes.