โ† Godot Visual Debugger

Setup guide

Everything you must provision before this skill can run โ€” the exact credentials, permissions, and where to click. Links go to the official consoles and docs, which stay current.

Quick setupโ‰ˆ 5-10 mingodot

No API keys. You need the Godot 4 binary on PATH and, for automated capture on Linux/CI, a virtual display โ€” Godot cannot take screenshots in --headless mode.

You need to already have

  • A Godot 4.x project
  • Godot 4 binary available on PATH

How the pieces connect

Credentials this skill needs

Set these as environment variables. Never paste secrets into a chat or commit them.

VariableWhat it isWhere to get it
GODOT_BIN
optional
Path to the Godot 4 binary
format: absolute path
Wherever you installed Godot; defaults to `godot` on PATH

Step by step

  1. 1

    Install Godot 4

    Download Godot 4.x and confirm with `godot --version`. The standard (non-.NET) build is fine unless the project uses C#.

    Open in the console / docs โ†—
  2. 2

    Add the VisualProbe autoload

    Project > Project Settings > Globals > Autoload. Add the script from the reference implementation with node name "VisualProbe" so it is globally callable.

    Open in the console / docs โ†—
  3. 3

    Enable capture on Linux/CI

    Install xvfb and run via `xvfb-run -a godot ...`. Do NOT use --headless: it loads the dummy rendering driver and every screenshot comes out blank.

    Open in the console / docs โ†—
  4. 4

    Confirm the harness actually renders

    Run a scene that calls VisualProbe.capture("smoke") and open the PNG under user://visual_debug. If it is blank, fix the rendering context before diagnosing anything else.

    Open in the console / docs โ†—

Check it worked

godot --version && xvfb-run -a godot --path . --quit-after 5 res://scenes/debug_capture.tscn

If you hit an error

Saved PNG is completely blank or transparent

Cause: Running with --headless, which uses the dummy rendering driver and never draws a frame.

Fix: Drop --headless; use xvfb-run on Linux or run windowed.

Screenshot shows the previous frame or is empty

Cause: get_image() was called before the frame finished drawing.

Fix: await RenderingServer.frame_post_draw before get_viewport().get_texture().get_image().

Node reports visible = true but nothing appears

Cause: An ancestor has visible = false or modulate.a = 0; the child still reports its own values.

Fix: Walk the parent chain with VisualProbe.explain_visibility instead of checking the node alone.

Effect works in the editor but not in the exported or web build

Cause: SDFGI, VoxelGI, SSAO, SSIL, SSR and volumetric fog are unsupported on the Compatibility renderer.

Fix: Test with --rendering-method gl_compatibility and pick an effect the target renderer supports.

Official documentation: https://docs.godotengine.org/en/stable/tutorials/editor/command_line_tutorial.html โ†—

API operations this skill uses (14)

Every call the skill makes, linked to its official reference page.

OperationCallPermissionRef
Capture the framebuffer
Produce a PNG the agent can inspect
CLI get_viewport().get_texture().get_image()โ€”docs โ†—
Wait for frame completion
Avoid capturing an undrawn frame
CLI await RenderingServer.frame_post_drawโ€”docs โ†—
Set debug draw mode
Split geometry faults from material/lighting faults
CLI Viewport.debug_draw = Viewport.DEBUG_DRAW_OVERDRAWโ€”docs โ†—
Read draw call count
Distinguish culled from drawn-but-invisible
CLI RenderingServer.get_rendering_info(RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME)โ€”docs โ†—
Read primitives in frame
Confirm geometry reached the GPU
CLI RenderingServer.get_rendering_info(RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME)โ€”docs โ†—
Read texture memory used
Spot missing or oversized textures
CLI RenderingServer.get_rendering_info(RENDERING_INFO_TEXTURE_MEM_USED)โ€”docs โ†—
Sample a pixel
Objectively read the rendered colour at a coordinate
CLI Image.get_pixelv(Vector2i)โ€”docs โ†—
Save capture to disk
Persist evidence for comparison
CLI Image.save_png("user://visual_debug/shot.png")โ€”docs โ†—
Inspect a material
Confirm a material exists and read its parameters
CLI MeshInstance3D.get_active_material(0)โ€”docs โ†—
Select renderer
Differential test across renderers
CLI godot --rendering-method forward_plus|mobile|gl_compatibilityโ€”docs โ†—
Select rendering driver
Isolate driver-specific faults
CLI godot --rendering-driver vulkan|opengl3|d3d12โ€”docs โ†—
Force resolution
Reproduce resolution-dependent symptoms
CLI godot --resolution 1280x720โ€”docs โ†—
Deterministic capture
Frame-stable captures independent of real time
CLI godot --fixed-fps 60 --write-movie out.aviโ€”docs โ†—
Run under a virtual display
Render in CI, where --headless cannot draw
CLI xvfb-run -a godot --path . res://scenes/debug_capture.tscnโ€”docs โ†—