Skip to content

Reproduce reliably

You cannot debug what you cannot trigger.

  1. Minimal path — smallest UI flow or API sequence that grows memory
  2. Fixed workload — same payload size, same loop count
  3. Disable noise — extensions off, other tabs closed (browser)
  4. Soak duration — leaks may need 10–30 min to separate from noise
  5. Record environment — Chrome version, Node version, build flags
async function soak(iterations = 100) {
for (let i = 0; i < iterations; i++) {
await openAndCloseModal(); // your suspect flow
if (i % 10 === 0 && performance.memory) {
console.log(i, performance.memory.usedJSHeapSize);
}
}
}

Use the examples/node/*-leak.js scripts — they loop forever with logging.

Terminal window
node --expose-gc examples/node/01-global-array-leak.js 2>&1 | tee leak.log
Field Example
Action Navigate Dashboard → Settings 50×
Expected Heap returns to ~baseline
Actual +3 MB per cycle
Suspect Router listener not removed