Demo data · everything on this page is made up

A code pad and debugger with Claire. reading along.

You can

  • step through a sample program
  • see the crash and ask Claire. to explain it
  • try her suggested fix and watch the program finish
  • open the other sample files

Made up

  • the program (cart.py) and its files
  • every variable, the call stack and the console output
  • the explanation and the fix

Nothing runs on your computer, nothing is sent, nothing is saved, and nothing here can be downloaded. The keyboard works: Tab to move, Enter or Space to press, arrow keys on the tabs. Your Motion setting in the footer is respected.

python · debugpy
1def total(items):
2 s = 0
●3 for i in items:
4 s += i["price"]
5 return s
6
7cart = [{"price": 4}, {"cost": 2}]
8
9def checkout():
10 return total(cart)
11
12checkout()

CLAIRE. READING ALONG

reading cart.py. the cart has two items.

CALL STACK

total · cart.py:3
checkout · cart.py:10
<module> · cart.py:12

VARIABLES

items = list[2]
s = 0

CONSOLE

> paused at line 3