Trace Object Lifetime
debug_trace_lifetimeTrace pointer or object lifetime to diagnose use-after-free, stale ownership, or unexpected pointer replacement via forward tracing and optional reverse stepping.
Instructions
Trace lifetime evidence for one debugger-visible pointer or object handle using the current snapshot, sanitizer/runtime output, bounded forward writer tracing, and optional reverse stepping when supported. Use this for suspected use-after-free, stale ownership, or unexpected pointer replacement. Do not use forward tracing on a frozen dump or when resuming the target is unsafe.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Debugger-visible pointer/object expression whose lifetime should be investigated. | |
| maxStops | No | Maximum forward writer observations. | |
| direction | No | Forward uses writer watchpoints, reverse uses stepBack, and hybrid collects both when supported. | forward |
| sessionId | No | Optional DAP session ID. Omit to use the backward-compatible default session. | |
| timeoutMs | No | Aggregate bound for forward temporal tracing. | |
| reverseSteps | No | Maximum reverse stepBack operations when reverse or hybrid is selected. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| initial | Yes | ||
| guidance | Yes | ||
| sanitizer | Yes | ||
| memoryHazards | Yes | ||
| forwardTimeline | No | ||
| reverseTimeline | No | ||
| allocationDeallocationHints | Yes |