trace_start
Begin tracing specified methods to capture call stacks and local variables without disrupting request flow. Optionally include unhandled exceptions.
Instructions
Begin tracing a set of methods. Each named method gets a server-side trace breakpoint that captures the call (top stack + locals) and auto-continues — the request flows through at near-normal speed and your debug state is unaffected. If includeExceptions=true, unhandled exceptions are also captured. Use trace_get to read the captured events and trace_stop to remove the trace. One trace active at a time.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| methods | Yes | Function names to trace (e.g. "Namespace.Class.Method"). Same format as breakpoint_set_function. | |
| captureStack | No | Capture top stack at each hit. Default true. | |
| captureLocals | No | Capture top-frame locals at each hit. Default true. | |
| includeExceptions | No | Also capture unhandled exceptions during the trace. Default true. | |
| maxFramesPerEvent | No | Maximum stack frames per captured event. Default 10. | |
| maxLocalsPerFrame | No | Maximum locals per captured event. Default 10. |