Here are all of the commands you covered in this course:
-
p
: Print the value of an expression. -
pp
: Pretty-print the value of an expression. -
n
: Continue execution until the next line in the current function is reached or it returns. -
s
: Execute the current line and stop at the first possible opportunity (either in a function that is called or in the current function). -
c
: Continue execution and only stop when a breakpoint is encountered. -
unt
: Continue execution until the line with a number greater than the current one is reached. With a line number argument, continue execution until a line with a number greater or equal to that is reached. -
l
: List source code for the current file. Without arguments, list 11 lines around the current line or continue the previous listing. -
ll
: List the whole source code for the current function or frame. -
b
: With no arguments, list all breaks. With a line number argument, set a breakpoint at this line in the current file. -
w
: Print a stack trace, with the most recent frame at the bottom. An arrow indicates the current frame, which determines the context of most commands. -
u
: Move the current frame count (default one) levels up in the stack trace (to an older frame). -
d
: Move the current frame count (default one) levels down in the stack trace (to a newer frame). -
h
: See a list of available commands. -
h <topic>
: Show help for a command or topic. -
h pdb
: Show the fullpdb
documentation. -
q
: Quit the debugger and exit.
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.
robotslave on Feb. 3, 2020
Thanks for the course. Pdb is much like the Perl debugger. I have one problem though - can’t get it working with Robot. If I launch the Robot executable with Pdb, I can specify a breakpoint (at least it is not rejected) - but then pdb doesn’t seem to stop at it at all. If tends to stop where there is a Pause (Robot keyword) call in the code, and at that point all the scope that is available is the Pause keyword scope. So any variables I want to print are only from the Pause Robot keyword - completely useless. Do you have any suggestions how to make it work with Robot?