get_scope_variables
Retrieve all variables in a specific scope during a paused JavaScript debugging session. Use this to inspect local, closure, or global variables at a given execution point.
Instructions
Retrieves all variables in a specific scope. Use this to see all local variables, closure variables, or global variables at a given point in execution.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>",
"call_frame_id": "<call_frame_id>"
},
"name": "get_scope_variables"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ID of the debugging session. The session must be paused. | |
| call_frame_id | Yes | ID of the call frame. Obtain this from get_call_stack. | |
| scope_index | No | Index of the scope in the scope chain. 0 is the local scope, higher indices are closure and global scopes. Defaults to 0. |