Skip to main content

Inspect or find specific objects

These tools are in the inspect toolset. Starting the server with MEMLAB_TOOLSETS=inspect exposes only them, plus the few tools every session needs, and memlab_tools({enable: "inspect"}) turns them on in a session. Try them in the order listed.

ToolUse it when
memlab_query_objectsAny combination of filters in one call: class regex, node type, property name, detached, self / retained size ranges like "1MB-". Sorted, paged and cached per snapshot.
memlab_find_nodes_by_classBy exact class name, or by name_pattern regex/substring.
memlab_search_nodesBy name/type/size predicates.
memlab_find_by_propertyBy a property name/value.
memlab_find_by_shapeBy property set.
memlab_module_presentIs this class in the heap AT ALL? Pre-flight before instrumenting a module.
memlab_match_objectBy a structural pattern.
memlab_get_nodeOne node’s details, with detachedness (attached / detached / unknown) and distance from the root.
memlab_object_shapeOne object’s properties and their sizes.
memlab_get_referencesOutgoing edges.
memlab_get_referrersIncoming edges.
memlab_get_propertyOne property of one object.
memlab_get_valueA scalar value, where the format allows it.
memlab_closure_inspectionWhat a closure captured, and what that costs.
memlab_global_variablesWhat is hanging off the global object.
memlab_aggregateSum/count over a node set.
memlab_for_eachRun one tool over many nodes.