godot-debugging-profiling

Diagnose Godot memory leaks, GPU spikes, and flaky headless CI runs with symptom-routed debug scripts.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/DecioLuvier/Shatterless --skill godot-debugging-profiling-decioluvier
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: godot-debugging-profiling
Source: https://github.com/DecioLuvier/Shatterless/tree/main/.claude/skills/godot/references/godot-debugging-profiling
Command: npx skills add https://github.com/DecioLuvier/Shatterless --skill godot-debugging-profiling-decioluvier

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Godot developers struggle to pinpoint memory leaks, GPU bottlenecks, thread races, and flaky headless CI failures using only print statements and breakpoints. This Skill routes concrete symptoms (orphan node growth, ObjectDB expansion, Visual Profiler spikes) to the correct monitor, API, and ready-made GDScript diagnostic script. ## Core Features & Use Cases - Symptom-to-Script Routing: A mandatory lookup table maps issues like RAM climbs, microbenchmark inaccuracies, and crash backtraces to specific scripts such as orphan_node_detector.gd and high_precision_benchmarker.gd. - Leak & Memory Diagnostics: Detect orphan nodes via OBJECT_ORPHAN_NODE_COUNT, set memory threshold alerts, and dump the scene tree to find leaked instances. - Headless CI QA: Run automated QA suites with deterministic exit codes and safe push_error handling for continuous integration pipelines. - Thread-Safe Logging & Custom Monitors: Intercept engine errors without recursion, log safely across threads, and register custom Performance monitors and EditorDebuggerPlugin tabs. - Use Case: Your exported game's RAM climbs after every scene change. The symptom table routes you to orphan_node_detector.gd, which uses the OBJECT_ORPHAN_NODE_COUNT monitor to confirm nodes are not being freed, then scene_tree_dump.gd identifies the offending subtree. ## Quick Start Ask the agent to diagnose why my Godot game's memory keeps growing after scene changes using the debugging skill's symptom table.

Frequently Asked Questions about godot-debugging-profiling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find memory leaks in a Godot game?▼

Use the OBJECT_ORPHAN_NODE_COUNT monitor in debug builds to detect nodes removed from the tree but never freed. The orphan_node_detector.gd script automates this, and scene_tree_dump.gd plus ObjectDB snapshots help identify which instances are leaking.

How do I profile Godot performance accurately?▼

Always profile release exports with V-Sync disabled, since debug builds run 5-10x slower and V-Sync masks true CPU/GPU overhead. Use Time.get_ticks_usec for microbenchmarks and the Visual Profiler only briefly, as continuous polling degrades framerates.

Why does OBJECT_ORPHAN_NODE_COUNT return zero in my exported game?▼

OBJECT_ORPHAN_NODE_COUNT is a debug-only monitor that safely returns 0 in release builds, which can hide real leaks. Run leak detection in debug builds or use custom monitors and memory threshold alerts for production diagnostics.

How do I run Godot headless tests in CI with proper exit codes?▼

Use Godot's headless --script mode combined with the automated_qa_suite.gd and push_error_safe_exit.gd scripts, which produce deterministic exit codes and convert engine errors into safe CI failures without hanging the runner.

Why does my custom Godot Logger crash with infinite recursion?▼

Calling print() or push_error() inside a Logger._log_message override causes infinite recursion because the logger intercepts its own output. Route intercepted errors to a file or backend sink instead, as shown in engine_error_interceptor.gd.

Can I debug Godot games on mobile devices without console output?▼

Yes, use an in-game debug console or overlay such as remote_debug_console.gd and debug_overlay.gd in debug builds. These display logs and metrics on-device when desktop stdout is unavailable.