DryRun

Your code’s dry run, drawn on paper

Paste a Python solution and an input. Watch every step drawn.

Try a two-pointer example Start with your own code

nums array, 2 pointers

The array 1, 3, 4, 6, 8, 11, 15 with the pointers left and right under it; the window between them is shaded and the two cells just read are marked. 1 3 4 6 8 11 15 0 1 2 3 4 5 6 left right
total
14
target
14
Step 18, about to run line 11: 3 + 11 is 14, the pair is found.

It draws what your code does

No special API and no annotations. DryRun watches what each variable is used for and draws it that way.

When your code… you see
indexes a list with moving integers, nums[left]the array, with each index variable as an arrow under its cell and the window between two pointers shaded
calls a function from inside itselfthe recursion tree, the current path in red, memo hits marked apart from real calls, big subtrees folded
fills dp[i][j] from other cellsthe table filling in, the cell just written highlighted and the cells it read marked
follows node.nextboxes and arrows, with slow, fast, prev and curr written on their nodes
walks node.left and node.rightthe tree, numbered in the order your code visits it
keeps neighbours in a dict or listthe graph, with the visited set shaded and the queue’s nodes outlined
uses heapq, append and pop, or poplefta heap as a tree and an array, a stack standing up, a queue lying down

Every highlight is an event the tracer recorded. A comment like # dryrun: grid dp overrides the guess.

How it works

Python in your browser

Your code runs in Pyodide, CPython compiled to WebAssembly, inside a Web Worker, so the page never freezes. Nothing is sent to a server; there isn’t one.

A tracer that records, not guesses

sys.settrace records every line, call and return, with the variables that changed. Two names for one list stay one list.

Limits, said out loud

5,000 steps, 200 nested calls and a few seconds per run. When a run hits a limit, DryRun says which one, and at which line.

Open the app