[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KR9TERNT98T64ZF4VK458Q":3,"skill-same:01M6KR9TERNT98T64ZF4VK458Q":82},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":36,"linkOnly":37,"markdownContent":38,"markdownBody":39,"frontMatter":40,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":47,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M6KR9TERNT98T64ZF4VK458Q","godot-debugging",null,"Use when debugging Godot projects — remote debugger, print techniques, signal tracing, common error patterns and fixes","jame581\u002FGodotPrompter","jame581","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F21112138?v=4","01M6KR3KEQ9Z30WVJRR2E2ZVXE","Jan Mesarč","01M6KR3KJVRMPDSMASQPBCBVK3",964,"MIT","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-debugging\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],"godot debugging","godot","debugging","error","when","signal","fixes","error patterns","techniques","print","remote","patterns","use","common","projects","debugger","tracing","2026-11-10 10:12:30",false,"---\nname: godot-debugging\ndescription: Use when debugging Godot projects — remote debugger, print techniques, signal tracing, common error patterns and fixes\n---\n\n# Godot Debugging\n\nThis skill covers systematic debugging for Godot 4.3+ projects in both GDScript and C#. It covers print techniques, breakpoints, signal tracing, the built-in profiler, scene tree inspection, common error patterns, and a step-by-step debugging checklist.\n\n> **Related skills:** **godot-optimization** for performance profiling, **godot-testing** for regression tests after fixes, **csharp-signals** for C# signal debugging patterns.\n\n---\n\n## 1. Print Debugging\n\n### GDScript\n\nGodot provides several print functions with different purposes. Choose based on the severity and context of what you are logging.\n\n```gdscript\n# print() — general output, space-separated values\nprint(\"Player position: \", position)\nprint(\"Health: \", health, \" \u002F \", max_health)\n\n# print_rich() — BBCode-formatted output in the Output panel\nprint_rich(\"[color=yellow]WARNING:[\u002Fcolor] Enemy count exceeded limit: \", enemy_count)\nprint_rich(\"[b]State:[\u002Fb] [color=green]\", current_state, \"[\u002Fcolor]\")\n\n# push_error() — logs an error with a full stack trace; does NOT stop execution\npush_error(\"save_game: file path is empty\")\n\n# push_warning() — logs a warning with stack trace; use for recoverable issues\npush_warning(\"AudioStreamPlayer: bus '%s' not found, using Master\" % bus_name)\n\n# print_debug() — print() plus the calling file:line when the debugger is attached;\n# it still prints in release exports (guard with OS.is_debug_build() to silence it)\nprint_debug(\"Frame delta: \", delta, \" | FPS: \", Engine.get_frames_per_second())\n\n# printerr() — prints to stderr; visible in external terminals and CI logs\nprinterr(\"Critical: physics state corrupted at frame \", Engine.get_process_frames())\n```\n\n**Formatted output patterns:**\n\n```gdscript\n# String formatting with % operator\nprint(\"Actor [%s] dealt %d damage to [%s]\" % [name, damage, target.name])\n\n# String.format() with named placeholders\nvar msg := \"Position: ({x}, {y}) at speed {spd}\"\nprint(msg.format({\"x\": position.x, \"y\": position.y, \"spd\": velocity.length()}))\n\n# Printing arrays and dictionaries — use str() for clean output\nvar inventory := {\"sword\": 1, \"potion\": 3}\nprint(\"Inventory: \", str(inventory))\n\n# Conditional verbose logging using a project-level constant or autoload flag\nif DebugConfig.verbose_ai:\n    print_rich(\"[color=cyan][AI][\u002Fcolor] \", agent.name, \" chose action: \", chosen_action)\n```\n\n```csharp\n\u002F\u002F String interpolation\nGD.Print($\"Actor [{Name}] dealt {damage} damage to [{target.Name}]\");\n\n\u002F\u002F Printing collections\nvar inventory = new Godot.Collections.Dictionary { { \"sword\", 1 }, { \"potion\", 3 } };\nGD.Print(\"Inventory: \", inventory);\n\n\u002F\u002F Conditional verbose logging\nif (DebugConfig.VerboseAi)\n    GD.PrintRich($\"[color=cyan][AI][\u002Fcolor] {agent.Name} chose action: {chosenAction}\");\n```\n\n**When to use each function:**\n\n| Function | Visible in Release | Stack Trace | Use For |\n|---|---|---|---|\n| `print()` | Yes (if not stripped) | No | General value inspection |\n| `print_rich()` | Yes | No | Categorised, colour-coded logs |\n| `push_error()` | Yes | Yes | Invalid state, programmer errors |\n| `push_warning()` | Yes | Yes | Recoverable problems |\n| `print_debug()` | Yes | Calling line (debugger attached) | Locating where a value was printed |\n| `printerr()` | Yes | No | External terminal \u002F CI output |\n\n### C\\#\n\n```csharp\nusing Godot;\n\npublic partial class Player : CharacterBody3D\n{\n    public override void _Ready()\n    {\n        \u002F\u002F GD.Print — equivalent to GDScript print()\n        GD.Print(\"Player position: \", Position);\n\n        \u002F\u002F GD.PrintRich — BBCode formatted\n        GD.PrintRich(\"[color=yellow]Ready called on[\u002Fcolor] \", Name);\n\n        \u002F\u002F GD.PushError — logs error with stack trace\n        GD.PushError(\"_Ready: required child node missing\");\n\n        \u002F\u002F GD.PushWarning — logs warning with stack trace\n        GD.PushWarning(\"AudioBus not found, falling back to Master\");\n\n        \u002F\u002F GD.PrintErr — writes to stderr\n        GD.PrintErr(\"Critical failure in _Ready\");\n    }\n\n    private void HandleDamage(int amount)\n    {\n        \u002F\u002F Formatted string output\n        GD.Print($\"[{Name}] took {amount} damage. HP: {_health}\u002F{_maxHealth}\");\n    }\n}\n```\n\n---\n\n## 2. Breakpoints and the Remote Debugger\n\n### Setting Breakpoints\n\n- Click the gutter (left of line numbers) in the Script editor to toggle a breakpoint. A red dot appears.\n- Use `F9` to toggle a breakpoint on the current line.\n- Use `breakpoint` as a statement in GDScript to trigger a programmatic breakpoint:\n\n```gdscript\nfunc _physics_process(delta: float) -> void:\n    if velocity.length() > MAX_SPEED:\n        breakpoint  # execution pauses here during debug runs\n    move_and_slide()\n```\n\n- In C#, use `System.Diagnostics.Debugger.Break()` or attach a .NET debugger (e.g. JetBrains Rider or VS Code with the Godot extension).\n\n```csharp\npublic override void _PhysicsProcess(double delta)\n{\n    if (Velocity.Length() > MaxSpeed)\n    {\n        System.Diagnostics.Debugger.Break(); \u002F\u002F pause if .NET debugger is attached\n    }\n    MoveAndSlide();\n}\n```\n\n### Using the Built-in Debugger Panel\n\nWhen execution pauses at a breakpoint, the **Debugger** panel (bottom of the editor) provides:\n\n- **Stack Frames** — the full call stack; click a frame to inspect its local variables.\n- **Locals \u002F Members \u002F Globals** — inspect and modify variable values live.\n- **Step Into (F11)** \u002F **Step Over (F10)** — navigate execution line by line (**Step Out**, Alt+F11, from Godot 4.6).\n- **Continue (F12)** — resume execution until the next breakpoint.\n\n### Remote Scene Inspector\n\nWhile a running game is paused or mid-session:\n\n1. Open **Debugger > Remote** tab in the editor.\n2. Click **Remote** in the Scene panel (top-left toggle next to \"Scene\") to switch the scene tree to the live view.\n3. Click any live node to inspect its current properties in the Inspector.\n4. Property changes made here are applied immediately for testing.\n\n### Monitors Tab\n\n**Debugger > Monitors** displays real-time engine metrics:\n\n- **FPS \u002F Process time \u002F Physics time** — spot performance regressions.\n- **Video RAM \u002F Object count \u002F Node count** — track memory growth.\n- **Physics 2D\u002F3D collision pairs** — identify expensive physics scenes.\n- **Audio latency** — catch audio callback overruns.\n\nClick any monitor name to open its graph. Use the **Add** button to build custom monitor dashboards.\n\n---\n\n## 3. Signal Debugging\n\nInspect at runtime via `node.get_signal_connection_list(\"signal_name\")` (returns Array of Dictionary with `callable`, `flags`, `signal`). The most common signal bugs: connecting twice (handler fires twice), forgetting to disconnect on free (warnings + dangling refs), wrong handler signature (`Error calling from signal …` on every emit).\n\n> See [references\u002Fsignal-tracing.md](references\u002Fsignal-tracing.md) for the full GDScript and C# inspection helpers and the common-signal-issues catalog (double connect, deferred-free races, lambda capture lifecycle, signal-vs-Callable choice).\n\n---\n\n## 4. Common Error Patterns\n\n| Error Message | Cause | Fix |\n|---|---|---|\n| `Node not found: \"Player\" (relative to \"...\")` | Wrong node path, node renamed, or accessed before it is added to the tree | Use `$NodeName` only in\u002Fafter `_ready()`. Verify path with `print(get_node_or_null(\"Player\"))`. Use `@onready`. |\n| `Attempt to call function on a null instance` | Node was freed, export not assigned, or `get_node()` returned null | Guard with `is_instance_valid(node)`. Check exports in Inspector. Prefer `@onready var _node := $Node`. |\n| `Can't change this state while flushing queries` | Modifying physics state (e.g. disabling a CollisionShape) inside a physics callback such as `body_entered` | Defer the change: `collision_shape.set_deferred(\"disabled\", true)`. |\n| `Invalid call. Nonexistent function 'X' in base 'Y'` | Calling a method that does not exist on that type, or accessing a node as the wrong type | Check `class_name`, cast with `as`, or verify the script is attached. Use `has_method(\"X\")` to guard. |\n| `Converting circular structure to JSON.` \u002F `Circular reference to resource being saved found` | A Resource or Dictionary references itself, directly or indirectly | Break the cycle. Use node references instead of resource references where possible, or mark sub-resources as local only. |\n| `Cannot call non-static function \"x()\" from the static function \"y()\".` | Calling an instance method from a `static func` | Move the call to an instance context or refactor to a proper static helper that takes data as arguments. |\n| `Stack overflow. Check for infinite recursion in your script.` | Infinite recursion — often a signal that triggers itself, or a setter that sets itself | Add a guard variable (`_updating := true`) in setters. Trace the call stack in the Debugger. |\n| `Signal 'x' is already connected to given callable '…' in that object.` | Calling `connect()` a second time on the same signal\u002Fcallable pair without `CONNECT_REFERENCE_COUNTED` | Check `is_connected()` before connecting, or disconnect first, or use `CONNECT_REFERENCE_COUNTED`. |\n| `Out of bounds get index 'X' (on base: 'Array')` | Accessing an Array or PackedArray beyond its length | Validate index before access: `if index \u003C array.size()`. Use `array.get(index)` where available. |\n| Audio crackles or drops out (underrun) | Audio callback missed its deadline; processing too much on the audio thread | Reduce audio bus effects, lower polyphony, or increase audio buffer size in Project Settings. |\n\n---\n\n## 5. Performance Debugging\n\nThe Profiler (Debugger → Profiler) shows per-function self-time and call counts. The Monitors tab tracks frame time, FPS, draw-call count, physics tick budget, memory. Open both during the most demanding gameplay scenario; sort the Profiler by **Self time** to find culprits. For draw-call bottlenecks, watch `Raster > Total Draw Calls` in the Monitors tab.\n\n> See [references\u002Fperformance-debugging.md](references\u002Fperformance-debugging.md) for Profiler workflow, Monitors tab usage, draw-call bottleneck identification, physics-tick monitoring patterns. See also **godot-optimization** for fixes once a bottleneck is identified.\n\n---\n\n## 6. Scene Tree Debugging\n\n`print_tree_pretty()` dumps the current scene tree to stdout — the fastest way to confirm a node lives where you think. The **Remote** tab in the editor shows the live scene tree while the game runs. For `@tool` nodes, implement `_get_configuration_warnings()` to surface configuration errors in the editor SceneTree dock.\n\n> See [references\u002Fscene-tree-debugging.md](references\u002Fscene-tree-debugging.md) for full examples (print_tree_pretty patterns, node-group debug helpers, _get_configuration_warnings GDScript + C#).\n\n---\n\n## 7. Systematic Debugging Method\n\nWhen prints, breakpoints, and remote inspection don't immediately reveal the bug, fall back to a deliberate process: **Reproduce → Isolate → Hypothesis → Trace → Fix → Verify → Add a Test.** Each step gates the next; skipping ahead wastes time.\n\n> See [references\u002Fsystematic-method.md](references\u002Fsystematic-method.md) for the full 7-step method with concrete techniques per step (binary search, minimal repro, regression-test patterns).\n\n---\n\n## 8. Implementation Checklist\n\n- [ ] Guard verbose frame-level output with `OS.is_debug_build()` — neither `print()` nor `print_debug()` is stripped from release builds\n- [ ] Use `push_error()` \u002F `push_warning()` (not `print()`) for invalid state and recoverable problems — they include stack traces\n- [ ] Set a breakpoint with `F9` or the `breakpoint` statement to pause execution rather than sprinkling prints\n- [ ] Check signal connections with `get_signal_connection_list()` before assuming a signal is wired correctly\n- [ ] Inspect the live scene tree with **Scene → Remote** during a debug session to verify runtime node state\n- [ ] Open **Debugger → Profiler** to measure Self time before optimizing — identify the real bottleneck first\n- [ ] Watch **Debugger → Monitors** for growing Object Count or Video RAM that indicate a leak\n- [ ] Use `is_instance_valid()` to guard any code that runs after an `await` in case the node was freed during the wait\n- [ ] Follow the Reproduce → Isolate → Hypothesize → Trace → Fix → Verify → Test order; do not skip ahead to a fix\n- [ ] Write a named regression test after fixing a bug so the same failure cannot silently recur\n","# Godot Debugging\n\nThis skill covers systematic debugging for Godot 4.3+ projects in both GDScript and C#. It covers print techniques, breakpoints, signal tracing, the built-in profiler, scene tree inspection, common error patterns, and a step-by-step debugging checklist.\n\n> **Related skills:** **godot-optimization** for performance profiling, **godot-testing** for regression tests after fixes, **csharp-signals** for C# signal debugging patterns.\n\n---\n\n## 1. Print Debugging\n\n### GDScript\n\nGodot provides several print functions with different purposes. Choose based on the severity and context of what you are logging.\n\n```gdscript\n# print() — general output, space-separated values\nprint(\"Player position: \", position)\nprint(\"Health: \", health, \" \u002F \", max_health)\n\n# print_rich() — BBCode-formatted output in the Output panel\nprint_rich(\"[color=yellow]WARNING:[\u002Fcolor] Enemy count exceeded limit: \", enemy_count)\nprint_rich(\"[b]State:[\u002Fb] [color=green]\", current_state, \"[\u002Fcolor]\")\n\n# push_error() — logs an error with a full stack trace; does NOT stop execution\npush_error(\"save_game: file path is empty\")\n\n# push_warning() — logs a warning with stack trace; use for recoverable issues\npush_warning(\"AudioStreamPlayer: bus '%s' not found, using Master\" % bus_name)\n\n# print_debug() — print() plus the calling file:line when the debugger is attached;\n# it still prints in release exports (guard with OS.is_debug_build() to silence it)\nprint_debug(\"Frame delta: \", delta, \" | FPS: \", Engine.get_frames_per_second())\n\n# printerr() — prints to stderr; visible in external terminals and CI logs\nprinterr(\"Critical: physics state corrupted at frame \", Engine.get_process_frames())\n```\n\n**Formatted output patterns:**\n\n```gdscript\n# String formatting with % operator\nprint(\"Actor [%s] dealt %d damage to [%s]\" % [name, damage, target.name])\n\n# String.format() with named placeholders\nvar msg := \"Position: ({x}, {y}) at speed {spd}\"\nprint(msg.format({\"x\": position.x, \"y\": position.y, \"spd\": velocity.length()}))\n\n# Printing arrays and dictionaries — use str() for clean output\nvar inventory := {\"sword\": 1, \"potion\": 3}\nprint(\"Inventory: \", str(inventory))\n\n# Conditional verbose logging using a project-level constant or autoload flag\nif DebugConfig.verbose_ai:\n    print_rich(\"[color=cyan][AI][\u002Fcolor] \", agent.name, \" chose action: \", chosen_action)\n```\n\n```csharp\n\u002F\u002F String interpolation\nGD.Print($\"Actor [{Name}] dealt {damage} damage to [{target.Name}]\");\n\n\u002F\u002F Printing collections\nvar inventory = new Godot.Collections.Dictionary { { \"sword\", 1 }, { \"potion\", 3 } };\nGD.Print(\"Inventory: \", inventory);\n\n\u002F\u002F Conditional verbose logging\nif (DebugConfig.VerboseAi)\n    GD.PrintRich($\"[color=cyan][AI][\u002Fcolor] {agent.Name} chose action: {chosenAction}\");\n```\n\n**When to use each function:**\n\n| Function | Visible in Release | Stack Trace | Use For |\n|---|---|---|---|\n| `print()` | Yes (if not stripped) | No | General value inspection |\n| `print_rich()` | Yes | No | Categorised, colour-coded logs |\n| `push_error()` | Yes | Yes | Invalid state, programmer errors |\n| `push_warning()` | Yes | Yes | Recoverable problems |\n| `print_debug()` | Yes | Calling line (debugger attached) | Locating where a value was printed |\n| `printerr()` | Yes | No | External terminal \u002F CI output |\n\n### C\\#\n\n```csharp\nusing Godot;\n\npublic partial class Player : CharacterBody3D\n{\n    public override void _Ready()\n    {\n        \u002F\u002F GD.Print — equivalent to GDScript print()\n        GD.Print(\"Player position: \", Position);\n\n        \u002F\u002F GD.PrintRich — BBCode formatted\n        GD.PrintRich(\"[color=yellow]Ready called on[\u002Fcolor] \", Name);\n\n        \u002F\u002F GD.PushError — logs error with stack trace\n        GD.PushError(\"_Ready: required child node missing\");\n\n        \u002F\u002F GD.PushWarning — logs warning with stack trace\n        GD.PushWarning(\"AudioBus not found, falling back to Master\");\n\n        \u002F\u002F GD.PrintErr — writes to stderr\n        GD.PrintErr(\"Critical failure in _Ready\");\n    }\n\n    private void HandleDamage(int amount)\n    {\n        \u002F\u002F Formatted string output\n        GD.Print($\"[{Name}] took {amount} damage. HP: {_health}\u002F{_maxHealth}\");\n    }\n}\n```\n\n---\n\n## 2. Breakpoints and the Remote Debugger\n\n### Setting Breakpoints\n\n- Click the gutter (left of line numbers) in the Script editor to toggle a breakpoint. A red dot appears.\n- Use `F9` to toggle a breakpoint on the current line.\n- Use `breakpoint` as a statement in GDScript to trigger a programmatic breakpoint:\n\n```gdscript\nfunc _physics_process(delta: float) -> void:\n    if velocity.length() > MAX_SPEED:\n        breakpoint  # execution pauses here during debug runs\n    move_and_slide()\n```\n\n- In C#, use `System.Diagnostics.Debugger.Break()` or attach a .NET debugger (e.g. JetBrains Rider or VS Code with the Godot extension).\n\n```csharp\npublic override void _PhysicsProcess(double delta)\n{\n    if (Velocity.Length() > MaxSpeed)\n    {\n        System.Diagnostics.Debugger.Break(); \u002F\u002F pause if .NET debugger is attached\n    }\n    MoveAndSlide();\n}\n```\n\n### Using the Built-in Debugger Panel\n\nWhen execution pauses at a breakpoint, the **Debugger** panel (bottom of the editor) provides:\n\n- **Stack Frames** — the full call stack; click a frame to inspect its local variables.\n- **Locals \u002F Members \u002F Globals** — inspect and modify variable values live.\n- **Step Into (F11)** \u002F **Step Over (F10)** — navigate execution line by line (**Step Out**, Alt+F11, from Godot 4.6).\n- **Continue (F12)** — resume execution until the next breakpoint.\n\n### Remote Scene Inspector\n\nWhile a running game is paused or mid-session:\n\n1. Open **Debugger > Remote** tab in the editor.\n2. Click **Remote** in the Scene panel (top-left toggle next to \"Scene\") to switch the scene tree to the live view.\n3. Click any live node to inspect its current properties in the Inspector.\n4. Property changes made here are applied immediately for testing.\n\n### Monitors Tab\n\n**Debugger > Monitors** displays real-time engine metrics:\n\n- **FPS \u002F Process time \u002F Physics time** — spot performance regressions.\n- **Video RAM \u002F Object count \u002F Node count** — track memory growth.\n- **Physics 2D\u002F3D collision pairs** — identify expensive physics scenes.\n- **Audio latency** — catch audio callback overruns.\n\nClick any monitor name to open its graph. Use the **Add** button to build custom monitor dashboards.\n\n---\n\n## 3. Signal Debugging\n\nInspect at runtime via `node.get_signal_connection_list(\"signal_name\")` (returns Array of Dictionary with `callable`, `flags`, `signal`). The most common signal bugs: connecting twice (handler fires twice), forgetting to disconnect on free (warnings + dangling refs), wrong handler signature (`Error calling from signal …` on every emit).\n\n> See [references\u002Fsignal-tracing.md](references\u002Fsignal-tracing.md) for the full GDScript and C# inspection helpers and the common-signal-issues catalog (double connect, deferred-free races, lambda capture lifecycle, signal-vs-Callable choice).\n\n---\n\n## 4. Common Error Patterns\n\n| Error Message | Cause | Fix |\n|---|---|---|\n| `Node not found: \"Player\" (relative to \"...\")` | Wrong node path, node renamed, or accessed before it is added to the tree | Use `$NodeName` only in\u002Fafter `_ready()`. Verify path with `print(get_node_or_null(\"Player\"))`. Use `@onready`. |\n| `Attempt to call function on a null instance` | Node was freed, export not assigned, or `get_node()` returned null | Guard with `is_instance_valid(node)`. Check exports in Inspector. Prefer `@onready var _node := $Node`. |\n| `Can't change this state while flushing queries` | Modifying physics state (e.g. disabling a CollisionShape) inside a physics callback such as `body_entered` | Defer the change: `collision_shape.set_deferred(\"disabled\", true)`. |\n| `Invalid call. Nonexistent function 'X' in base 'Y'` | Calling a method that does not exist on that type, or accessing a node as the wrong type | Check `class_name`, cast with `as`, or verify the script is attached. Use `has_method(\"X\")` to guard. |\n| `Converting circular structure to JSON.` \u002F `Circular reference to resource being saved found` | A Resource or Dictionary references itself, directly or indirectly | Break the cycle. Use node references instead of resource references where possible, or mark sub-resources as local only. |\n| `Cannot call non-static function \"x()\" from the static function \"y()\".` | Calling an instance method from a `static func` | Move the call to an instance context or refactor to a proper static helper that takes data as arguments. |\n| `Stack overflow. Check for infinite recursion in your script.` | Infinite recursion — often a signal that triggers itself, or a setter that sets itself | Add a guard variable (`_updating := true`) in setters. Trace the call stack in the Debugger. |\n| `Signal 'x' is already connected to given callable '…' in that object.` | Calling `connect()` a second time on the same signal\u002Fcallable pair without `CONNECT_REFERENCE_COUNTED` | Check `is_connected()` before connecting, or disconnect first, or use `CONNECT_REFERENCE_COUNTED`. |\n| `Out of bounds get index 'X' (on base: 'Array')` | Accessing an Array or PackedArray beyond its length | Validate index before access: `if index \u003C array.size()`. Use `array.get(index)` where available. |\n| Audio crackles or drops out (underrun) | Audio callback missed its deadline; processing too much on the audio thread | Reduce audio bus effects, lower polyphony, or increase audio buffer size in Project Settings. |\n\n---\n\n## 5. Performance Debugging\n\nThe Profiler (Debugger → Profiler) shows per-function self-time and call counts. The Monitors tab tracks frame time, FPS, draw-call count, physics tick budget, memory. Open both during the most demanding gameplay scenario; sort the Profiler by **Self time** to find culprits. For draw-call bottlenecks, watch `Raster > Total Draw Calls` in the Monitors tab.\n\n> See [references\u002Fperformance-debugging.md](references\u002Fperformance-debugging.md) for Profiler workflow, Monitors tab usage, draw-call bottleneck identification, physics-tick monitoring patterns. See also **godot-optimization** for fixes once a bottleneck is identified.\n\n---\n\n## 6. Scene Tree Debugging\n\n`print_tree_pretty()` dumps the current scene tree to stdout — the fastest way to confirm a node lives where you think. The **Remote** tab in the editor shows the live scene tree while the game runs. For `@tool` nodes, implement `_get_configuration_warnings()` to surface configuration errors in the editor SceneTree dock.\n\n> See [references\u002Fscene-tree-debugging.md](references\u002Fscene-tree-debugging.md) for full examples (print_tree_pretty patterns, node-group debug helpers, _get_configuration_warnings GDScript + C#).\n\n---\n\n## 7. Systematic Debugging Method\n\nWhen prints, breakpoints, and remote inspection don't immediately reveal the bug, fall back to a deliberate process: **Reproduce → Isolate → Hypothesis → Trace → Fix → Verify → Add a Test.** Each step gates the next; skipping ahead wastes time.\n\n> See [references\u002Fsystematic-method.md](references\u002Fsystematic-method.md) for the full 7-step method with concrete techniques per step (binary search, minimal repro, regression-test patterns).\n\n---\n\n## 8. Implementation Checklist\n\n- [ ] Guard verbose frame-level output with `OS.is_debug_build()` — neither `print()` nor `print_debug()` is stripped from release builds\n- [ ] Use `push_error()` \u002F `push_warning()` (not `print()`) for invalid state and recoverable problems — they include stack traces\n- [ ] Set a breakpoint with `F9` or the `breakpoint` statement to pause execution rather than sprinkling prints\n- [ ] Check signal connections with `get_signal_connection_list()` before assuming a signal is wired correctly\n- [ ] Inspect the live scene tree with **Scene → Remote** during a debug session to verify runtime node state\n- [ ] Open **Debugger → Profiler** to measure Self time before optimizing — identify the real bottleneck first\n- [ ] Watch **Debugger → Monitors** for growing Object Count or Video RAM that indicate a leak\n- [ ] Use `is_instance_valid()` to guard any code that runs after an `await` in case the node was freed during the wait\n- [ ] Follow the Reproduce → Isolate → Hypothesize → Trace → Fix → Verify → Test order; do not skip ahead to a fix\n- [ ] Write a named regression test after fixing a bug so the same failure cannot silently recur\n",{"name":5,"description":7},"master","d7b26cdb5fae14d4ef7b713c5bf259395e75c3c6","skills\u002Fgodot-debugging",63,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter","https:\u002F\u002Fgithub.com\u002Fjame581","https:\u002F\u002Fjanmesarc.online\u002F","Software engineer. My biggest passion is game development.","2026-11-14 20:45:49",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add jame581\u002FGodotPrompter --skill godot-debugging",{"tool":56,"command":57},"bunx","bunx skills add jame581\u002FGodotPrompter --skill godot-debugging",{"tool":59,"command":60},"pnpm","pnpm dlx skills add jame581\u002FGodotPrompter --skill godot-debugging","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-debugging\u002FSKILL.md",true,[64,70,74,78],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Fperformance-debugging.md","REFERENCE","参考文档",4454,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-debugging\u002Freferences\u002Fperformance-debugging.md",{"path":71,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fscene-tree-debugging.md",3276,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-debugging\u002Freferences\u002Fscene-tree-debugging.md",{"path":75,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fsignal-tracing.md",5649,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-debugging\u002Freferences\u002Fsignal-tracing.md",{"path":79,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Fsystematic-method.md",4296,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-debugging\u002Freferences\u002Fsystematic-method.md",[83,102,123,148,164,181],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":36},"01M6KRFE5BR2PSD08ZKDAS66R7","xr-development","Use when building VR\u002FAR\u002FXR applications — OpenXR setup, XROrigin3D, hand tracking, controllers, passthrough, and Meta Quest deployment in Godot 4.3+","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fxr-development\u002FSKILL.md",[],[90,91,23,92,20,93,94,95,96,97,98,31,99,100,101],"xr development","development","deployment","vr","setup","tracking","godot 4","ar","hand","Meta","applications","quest",{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":36},"01M6KRF8GZTG1TAS506MFBSGFC","web-services","Use when a Godot game calls a web server — HTTPRequest, downloads, REST\u002FJSON APIs, auth headers, WebSocketPeer clients, TLS, retries, and keeping secrets out of the build. Not for game networking\u002FRPCs (multiplayer-basics) or browser export (web-export)","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-services\u002FSKILL.md",[],[109,110,111,112,113,114,115,116,31,23,20,117,118,119,120,121,122],"web services","web","services","tls","retries","calling","auth","downloads","clients","headers","secrets","json","build","REST",{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":36},"01M6KRF38Q4WSKAYFS56PG87T0","web-export","Use when shipping a Godot game to the browser — Web export preset options, threads vs no-threads and COOP\u002FCOEP headers, hosting on itch.io or your own server, PWA, JavaScriptBridge, user:\u002F\u002F persistence, audio and input limits, and load size","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-export\u002FSKILL.md",[],[110,130,131,132,133,134,135,136,118,137,138,23,139,140,141,142,143,144,31,145,146,147],"export","web export","threads","limits","shipping","size","options","hosting","input","Coop","preset","browser","game","io","load","pwa","Audio","server",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":36},"01M6KREYFETEBH62ZTN6EZH2X3","using-godot-prompter","Bootstrap skill — establishes how to find and use GodotPrompter skills, with platform-specific tool mapping","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fusing-godot-prompter\u002FSKILL.md",[],[20,155,156,157,158,31,159,160,161,162,163],"using godot prompter","find","with","bootstrap","tool","platform","mapping","how","how to",{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":36},"01M6KRER5G7EQWKGAFN8QJKQ69","tween-animation","Use when implementing tweens — property animation, method tweening, chaining, parallel sequences, easing, and common UI\u002Fgameplay motion recipes","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Ftween-animation\u002FSKILL.md",[],[171,172,31,173,174,175,176,177,178,32,179,23,180],"tween animation","Animation","motion","parallel","gameplay","chaining","ui","recipes","implementing","sequences",{"skillNo":182,"name":183,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":185,"categories":186,"keywords":187,"publishedAt":36},"01M6KREKGCQMVDV8WX7HWX8BZG","state-machine","Use when building a state machine or refactoring logic into one — enum, node, and resource-based FSM patterns with trade-offs. Not for adding states to an existing one","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fstate-machine\u002FSKILL.md",[],[188,189,190,20,23,30,191,192,193,194,157,31,179,195],"state","state machine","machine","node","fsm","state machines","trade","trade-offs"]