set_variable
Update a variable's value in the current scope during a stopped .NET debug session, using its variables_reference.
Instructions
Set a variable's value during debugging.
State: STOPPED required.
Modifies a variable in the current scope. The program must be stopped. Use get_variables first to find the variables_reference for the scope.
Args: variables_reference: Reference from get_scopes or get_variables name: Variable name to modify value: New value as a string expression
Escape hatch: see the dap-escape-hatch prompt for unwrapped DAP requests.
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": {
"variables_reference": "<variables_reference>",
"name": "<name>",
"value": "<value>"
},
"name": "set_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| value | Yes | ||
| variables_reference | Yes |