inspect
Inspect and debug code by retrieving call stacks, variables, evaluating JavaScript expressions, or searching code and function definitions.
Instructions
Inspect and debug code. Actions: getCallStack (get call stack when paused), getVariables (get variables in call frame), evaluateExpression (evaluate JavaScript), searchCode (search code by pattern), searchFunctions (find function definitions)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results (for searchCode action default: 100, for searchFunctions default: 50) | |
| action | Yes | Inspection action: getCallStack (get call stack when paused), getVariables (get variables in call frame), evaluateExpression (evaluate JavaScript), searchCode (search code by pattern), searchFunctions (find function definitions) | |
| filter | No | Regex filter for variable names (for getVariables action) - applies to ALL scopes. Required when too many variables exist | |
| isRegex | No | Treat as regex (for searchCode action, default: true) | |
| pattern | No | Regex pattern (required for searchCode action) | |
| maxDepth | No | Max expansion depth (for getVariables and evaluateExpression actions, default: 2). Auto-reduced if response too large | |
| maxTokens | No | Max tokens for getVariables response (default: 1000). Depth auto-reduced to fit, filter required if still exceeded | |
| urlFilter | No | URL filter regex (for searchCode and searchFunctions actions) | |
| expression | No | JavaScript expression (required for evaluateExpression action) | |
| callFrameId | No | Call frame ID (required for getVariables, optional for evaluateExpression) | |
| functionName | No | Function name (required for searchFunctions action) | |
| caseSensitive | No | Case sensitive (for searchCode and searchFunctions actions, default: false) | |
| expandObjects | No | Expand objects/arrays (for getVariables and evaluateExpression actions, default: true) | |
| includeGlobal | No | Include global scope (for getVariables action, default: false) | |
| connectionReason | No | Connection reference (use the reference from launchChrome output, e.g., "unnamed-connection-default" or your renamed tab) |