inspect_variable
Inspect a PHP variable's value at a paused debug breakpoint. Use JSONPath filters to retrieve specific properties or nested data efficiently.
Instructions
Inspects a PHP variable's value at the current breakpoint. Only works when session is PAUSED.
WHEN TO USE:
After hitting a breakpoint (status="paused")
To examine specific values causing bugs
To understand object structure before filtering
CONTEXT EFFICIENCY - Full dumps are expensive. Use JSONPath filters: BAD (returns thousands of lines): inspect_variable("$order") GOOD (returns only what you need): inspect_variable("$order", "$.total") inspect_variable("$order", "$.items[*].sku") inspect_variable("$request", "$.input.email")
Without a filter, returns structure only (keys/types, no values).
JSONPATH EXAMPLES:
'$.property' - Single property
'$.items[0]' - First array element
'$.items[*].id' - All IDs in items array
'$.user.profile.name' - Nested property
REQUIRES: Session must be paused. Call get_session_status to verify.
COMMON VARIABLES:
'$this' - Current object instance
'$request' - HTTP request (Laravel)
'$_GET', '$_POST', '$_SERVER' - PHP superglobals
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | PHP variable name including $. Examples: '$this', '$request', '$user', '$_SERVER' | |
| depth | No | Recursion depth for nested objects. Default 1, max 3. Higher values return more data but cost more context. | |
| filter | No | JSONPath to filter results. Examples: '$.email', '$.items[0].price', '$.user.name'. Omit for structure-only view. |