tracecode demos

Explore Python execution one step at a time. Open a demo to move through its trace, inspect values, and follow calls and control flow.

State and calls

Follow variable values through nested function calls and returns.

Run from the project root: tracecode --auto-open docs/demos/state_and_calls.py

Conditions

Inspect the outcomes of if/elif branches and a while loop.

Run from the project root: tracecode --auto-open docs/demos/conditions.py

Console I/O

See how standard input and output are captured in a trace.

Run from the project root: printf 'Ada\\n3\\n' | tracecode --auto-open docs/demos/console_io.py

Exceptions

Follow a ValueError through nested calls and see it caught.

Run from the project root: printf 'not-a-number\\n' | tracecode --auto-open docs/demos/exceptions.py

Combined walkthrough

Explore calls, changing values, conditions, a loop, console I/O, and a caught exception together.

Run from the project root: printf '3\\n90\\n70\\n50\\nnot-a-number\\n' | tracecode --auto-open docs/demos/walkthrough.py