sincecutoff.com
← all changes

chrome-devtools-mcp query_heapsnapshot_objects

Introduced 2026-08-25 · score 0.93

HOW TO USE IT

When investigating memory use or detached DOM nodes, start chrome-devtools-mcp with memory debugging enabled, then call `query_heapsnapshot_objects` on a `.heapsnapshot` file with the needed filters and pagination.

query_heapsnapshot_objects({"filePath":"<path>.heapsnapshot","className":"<class name or regex>","isDetached":true,"pageIdx":0,"pageSize":20})
query_heapsnapshot_objects({"filePath":"<path>.heapsnapshot","propertyName":"<property>","nodeType":"<V8 node type>","minRetainedSize":<bytes>,"maxRetainedSize":<bytes>,"minSelfSize":<bytes>,"maxSelfSize":<bytes>,"sortBy":"retainedSize","pageIdx":0,"pageSize":20})
npx chrome-devtools-mcp@1.8.0 --memoryDebugging=true

WHY THIS HELPS

Filter and sort objects in a heap snapshot while investigating memory use or detached DOM nodes.

REQUIREMENTS AND LIMITATIONS

  • Version: 1.8.0
  • filePath (required): Path to a `.heapsnapshot` file to read.
  • className: Regex or text matching the object class name.
  • propertyName: Filter on outgoing reference edge property name.
  • nodeType: V8 node type filter, e.g. object, closure, string, array, code.
  • isDetached: Filter for detached DOM nodes.
  • minRetainedSize: Minimum retained size in bytes.
  • maxRetainedSize: Maximum retained size in bytes.
  • minSelfSize: Minimum self size in bytes.
  • maxSelfSize: Maximum self size in bytes.
  • pageIdx: Page index for pagination.
  • pageSize: Page size for pagination.
  • sortBy: Sort by `retainedSize`, `selfSize`, or `id`; defaults to `retainedSize`.
  • Prerequisite: Start the server with `--memoryDebugging=true` to enable this tool.
  • Prerequisite: Supply a `.heapsnapshot` file path.
  • `filePath` must point to a `.heapsnapshot` file.
  • `sortBy` accepts `retainedSize`, `selfSize`, or `id`; it defaults to `retainedSize`.
  • Size filters are measured in bytes.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card