set_variable_value
Change a variable's value in a paused debugging session. Specify session, call frame, scope index, variable name, and a JavaScript expression for the new value to test scenarios or fix values during debugging.
Instructions
Modifies the value of a variable in a specific call frame. Use this to test different scenarios or fix values during debugging.
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 containing the variable. Obtain from get_call_stack. | |
| scope_index | Yes | Index of the scope containing the variable. 0 is the local scope. | |
| variable_name | Yes | Name of the variable to modify. | |
| new_value | Yes | JavaScript expression that evaluates to the new value. Examples: "42", "'new string'", "{a: 1, b: 2}", "null" |