Skip to main content
Memory panel. snapshot captures a .heapsnapshot artifact (opens in DevTools Memory) and summarizes objects by class with sizes and detached DOM node count. compare diffs two snapshots by class (growth). retainers lists what holds instances of a class. sampling start/stop records an allocation sampling profile (.heapprofile) with top allocating functions. usage returns current heap size; growth samples heap usage over time to spot leaks.
Heap snapshots, class diffs, retainers and allocation sampling need developer mode because Chrome does not expose HeapProfiler to extensions. usage and growth work in both modes.

Parameters

integer
Target tab id from browser_tabs, which lists tabs across all windows. Defaults to the agent’s most recently opened usable tab, or the only usable tab. Otherwise select a listed tabId.
enum
required
One of: snapshot, compare, retainers, sampling, usage, growth, list.
string
 
string
 
string
 
integer
 
enum
For sampling One of: start, stop.
integer
 
number
growth: duration, default 10
boolean
Collect garbage first (default true for snapshot)

Example

Growth between two snapshots
Sample heap usage for 20 seconds