Activities
Copy the following into a new Python file:
Breakpoint and Next (n)
Run the above code. When the debugger starts running, type 'n' and press enter on each line until you are finished debugging.
Describe what happened.
Single Line Stepping (s)
Run the above code. When the debugger starts running, type 's' and press enter on each line until you are finished debugging.
Describe what happened.
Compare the next (n) command with the step (s) command.
Watch, whatis and print (p)
Run the above code. When the debugger starts running, type 's' and press enter for 8 lines in a row.
Then, type 'whatis total'
Then, type 'p total'
Describe what happened.
Compare whatis and print (p) commands.
Last updated