Goal: by the end of this lesson you can record what a run actually did — every fn it invoked, in call order, with per-node results — step through that record, and capture a live HTTP request to your app the same way.
Concepts introduced: the path trace (Trace path /
+ capture values), the path canvas highlight, the tree
step-through view, the Runs tab’s «catch next request»
trap,
secret redaction in traces.
Graphden executes lazily: a node runs when something forces its value, cached calls skip their body entirely, and compile-time values never run at all. A classical pause-at-a-breakpoint debugger would step through that order — which rarely matches how you read the graph. So graphden debugs by recording: run once with the trace on, then walk the completed call tree as many times as you like. Deterministic, shareable (it’s stored on the run), and nothing sits paused holding threads.
Prefer to be shown? This lesson exists as a guided in-editor tour: open the demo with the tour running (no sign-up), or pick “Interactive tutorial” in the editor’s account menu.
Take any composed fn of yours (something with a few refs — the
slugify test subject from lesson 17, or any page fn):
⋯ → ▶ Run) — this lands the Inspector on the
Runs tab.3× 12ms, cache, secret), and with values captured, a chip
with its return: short values print right on the card (= "HI",
= 11), longer ones end in … and open the full captured value on click.
= unavailable means that invocation’s value was not stored; opening it
explains the capture limit rather than showing an earlier value.The tree button opens a side panel: one row per invocation, in
call order, indented by who-called-whom. Each row shows the fn name,
a chip (12ms fresh call · cache memoised — the body didn’t run ·
secret hidden), and, for capture-values runs, a collapsible
value viewer with that node’s return.
Esc or ✕ closes the panel.trace truncated note means the run hit a cap. There are two,
and they cut from opposite ends: recording stops at 10 000
frames (the first 10 000 are kept), and a stored trace over
256 KB drops its oldest frames until it fits. Frames whose
parent was dropped show up as roots rather than vanishing.Captured values have caps of their own, each reported rather than silent:
= unavailable and its popover explains the cap;some values
dropped;:secret-typed data gets a red secret badge,
no timings and no value chip — its value is never read by the
capture machinery, in either mode (next section).Traces obey the same :secret rules as results (lesson 16):
secret — its value
is never read into the trace at all;derived from secret
instead of a value;unknown type) — no type information means no capture;Traces of manual runs cover fns you can call from the Run pane. For a web handler you usually want the real thing: the actual HTTP request, with its params and headers. That’s the trap:
/shop) — empty catches the
next request to any app path (the editor’s own /api/… and
/partials/… traffic is excluded so it can’t eat the trap).curl the route.Cookies, Authorization headers and Set-Cookie are stripped
before anything is stored — a captured run never becomes a
credential store.