GDScript Doctor
Systematic diagnosis and resolution of common Godot/GDScript errors.
Workflow
- •Reproduction: Run the specific test file in GUT or launch the scene via F5.
- •Trace Analysis: Verify the line number and base object type in the Godot Output console.
- •Lookup: Match the symptom in bug-library.md.
- •Fix & Verify:
- •Apply the correction (e.g., null check, deferred call).
- •Re-run benchmarks or unit tests 3x to ensure stability.
Guidelines
- •Log Verbosity: Use
push_error()for fatal issues andprint()for state tracking. - •Node Discovery: Use
mcp_godot-mcp_list_nodesto find invalid paths.
Artefacts to Update (bug fixes)
- •When a fix requires changing APIs, data formats, or public contracts, add an entry to
./docs/todo/master_todo.mddescribing the change and which files will be modified. - •Update
references/bug-library.mdwith the discovered symptom and the fix pattern for future reference. - •Commit tests that reproduce the failure along with the fix and include the GUT summary in the PR description.