sincecutoff.com
← all changes

get_heapsnapshot_details filters by native context

Introduced 2026-08-10 · score 0.97

HOW TO USE IT

When investigating memory use with a loaded heap snapshot, call `get_heapsnapshot_details` with an applicable native-context `filterName` to narrow aggregates. For `attributedToSpecificNativeContext`, also pass that context’s `objectId`.

get_heapsnapshot_details({"filePath":"<path-to-heapsnapshot>","filterName":"sharedNativeContext"})
get_heapsnapshot_details({"filePath":"<path-to-heapsnapshot>","filterName":"attributedToSpecificNativeContext","objectId":<context-node-id>})

WHY THIS HELPS

Narrow heap snapshot object or aggregate results to a native context while investigating memory use.

REQUIREMENTS AND LIMITATIONS

  • Version: 1.7.0
  • filePath (required): Path to the .heapsnapshot file to read.
  • filterName: Optional aggregate filter. Allowed: objectsRetainedByDetachedDomNodes, objectsRetainedByConsole, objectsRetainedByEventHandlers, objectsRetainedByContexts, sharedNativeContext, noNativeContext, attributedToSpecificNativeContext.
  • objectId: Specific native context object ID (nodeId), used when filterName is attributedToSpecificNativeContext.
  • Prerequisite: Requires `--memoryDebugging=true`.
  • The `filterName` and `objectId` parameters are optional.
  • `objectId` is for the `attributedToSpecificNativeContext` filter.
  • The documented filters apply to nodes or aggregates.

FIRST-PARTY EVIDENCE

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

Report a problem with this card