debug_set_breakpoints
Set breakpoints in a GDScript file to halt execution at specified lines, enabling inspection with debug_stack_trace and debug_inspect. Pass an empty array to clear existing breakpoints.
Instructions
Set breakpoints in a GDScript file, replacing any previously set in that file. Returns: each breakpoint with whether Godot verified it and the line it bound to. IMPORTANT: lines are ZERO-BASED, matching every other tool here. Set these before running the game, then use debug_stack_trace and debug_inspect once execution stops.
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": {
"file": "<file>",
"lines": "<lines>"
},
"name": "debug_set_breakpoints"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Path to the .gd file | |
| lines | Yes | Zero-based line numbers. Pass [] to clear all breakpoints in the file. |