← ClaudeAtlas

godot-debugginglisted

Debug Godot 4.x errors, crashes, and unexpected behavior. Corrective lens for Godot 3 vs 4 API confusion, async pitfalls, lifecycle timing, and physics gotchas.
haingt-dev/agent · ★ 0 · Code & Development · score 65
Install: claude install-skill haingt-dev/agent
# Godot Debugging ## Debugging Workflow 1. Read the FULL error message — "ON BASE: NULL INSTANCE" matters more than the property name 2. Check scene tree path validity (node names, hierarchy, timing) 3. Use `print_stack()` for call chain, not just `print()` 4. Profile before optimizing — Debug > Profiler > Time column ## Corrective Lens: What Models Get Wrong ### Godot 3 vs 4 API Confusion Models frequently suggest deprecated Godot 3 APIs. Always use the Godot 4 equivalents: | Godot 3 (WRONG) | Godot 4 (CORRECT) | Notes | |---|---|---| | `deg2rad()` | `deg_to_rad()` | All math utils renamed | | `rand_range()` | `randf_range()` | Also `randi_range()` for int | | `connect("signal", obj, "method")` | `signal_name.connect(callable)` | Callable-based signals | | `move_and_slide(velocity, up)` | `move_and_slide()` | velocity is now a property | | `BUTTON_LEFT` | `MOUSE_BUTTON_LEFT` | All input enums renamed | | `yield(obj, "signal")` | `await obj.signal` | yield removed entirely | | `instance()` | `instantiate()` | PackedScene method | | `KinematicBody2D` | `CharacterBody2D` | Node type renamed | | `Sprite` | `Sprite2D` | 2D suffix added | | `export var` | `@export var` | Annotation syntax | | `onready var` | `@onready var` | Annotation syntax | | `set_cell(x, y, id)` | `set_cell(layer, coords, source, atlas, alt)` | TileMap completely reworked | ### Async/Await Pitfalls - `await` on signal that fires instantly → returns immediately (not next frame) - `await tween.finished`