Programming

Python Stack Frame Visualizer — Call Stack View

See Python's call stack while your code runs: each function call pushes a frame with its own local variables, each return pops it, and recursion builds a tower of frames. Follow every call and return value, and see the stack depth over the whole run.
Real Python 3.11 in your browserNothing is uploaded

Code

Input for input() — one line per call

Runs real Python 3.11 (Pyodide) in your browser. Ctrl+Enter runs; after running, use ← and → to step.

Step through

Press Run to execute the code. The first run downloads the Python runtime (about 10 MB, once per visit).

Programs that run longer are stopped, so an infinite loop cannot freeze the page.

How to use this tool

  1. 1Paste code with function calls, or pick the factorial or Fibonacci example.
  2. 2Press Run to execute it with real Python in your browser.
  3. 3Step through: the top frame is the one running, frames below are waiting for it to return.
  4. 4Use the depth chart and the call list to jump to any call or return.

Frequently asked questions

When a function calls another, the caller pauses until the callee returns. The top frame is running; frames below it are waiting for their return value.

Yes. Recursive calls stack up one frame per call; the depth chart and the call list (with each call’s arguments and return value) show exactly how the recursion unwinds.

No. The tool runs real Python 3.11 (Pyodide, Python compiled to WebAssembly) inside your browser. The first run downloads the runtime (about 10 MB) once per visit; your code never leaves your device.