classic-debugging

Diagnose classic-wgl engine issues using channel-gated logging, golden traces, and state dumps.

1|1|Updated Aug 18, 2021
One-click install
npx skills add https://github.com/guilledk/classic-wgl --skill classic-debugging-guilledk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: classic-debugging
Source: https://github.com/guilledk/classic-wgl/tree/main/.agents/skills/classic-debugging
Command: npx skills add https://github.com/guilledk/classic-wgl --skill classic-debugging-guilledk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Debugging a Rust game engine across native, web, and headless targets is hard when logs flood the console and rendering bugs look plausible while being broken. This Skill provides a structured diagnostic workflow for classic-wgl: channel-gated CLASSIC_LOG filtering, golden trace diffing, state dump inspection, and step-by-step playbooks for common failures. ## Core Features & Use Cases - Channel-gated logging: Filter 25 log channels (ui, collision, render, gfx, path, etc.) via the CLASSIC_LOG env var or ?classic_log= URL parameter, with throttle macros like cl_every! and cl_once! to control per-frame noise. - Golden trace diffing: Compare deterministic JSONL draw-call traces against a committed baseline to catch sort-order, camera-matrix, or entity-count regressions in headless CI. - State dump inspection: Press F9 to dump state.json with full entity/component data for diagnosing invisible entities, corrupted tilemaps, or broken navigation meshes. - Use Case: A click handler stops firing after a refactor. Enable CLASSIC_LOG=physics=trace, follow the click-dispatch playbook to check collider enabled state, Disabled propagation, and consumesClick guards, then pinpoint the exact dispatch stage that drops the event. ## Quick Start Ask the assistant to help debug why an entity is not visible in classic-wgl using the CLASSIC_LOG channels and the entity-not-visible playbook.

Frequently Asked Questions about classic-debugging

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

FAQPage Schema
How do I enable debug logging in classic-wgl?

Set the CLASSIC_LOG environment variable with comma-separated channel tokens, such as CLASSIC_LOG=ui,collision=trace. On web, use the ?classic_log= URL query parameter instead. When unset, all 25 channels default to Info level.

How do I compare golden traces in headless CI?

Run with CLASSIC_HEADLESS=1 CLASSIC_FRAMES=60 CLASSIC_TEST=all CLASSIC_GOLDEN=check to fail on deviation from the baseline JSONL trace. Use CLASSIC_GOLDEN=update to regenerate the baseline, then diff the .actual.trace.jsonl against the committed reference.

Why is my entity not visible in the classic-wgl renderer?

Enable CLASSIC_LOG=ecs=trace,render=trace and dump state.json with F9. Check for a Disabled component on the entity or ancestors, verify IsoSprite position and scale, confirm the texture loaded via the asset channel, and validate the tilemap reference.

Can I change CLASSIC_LOG channels at runtime?

No. Channels are parsed once at Engine::new() startup and the atomic level table cannot be toggled at runtime. Changing channels requires a process restart on native or a page reload on web.

Why does my shadow rendering look wrong but plausible?

Partial-strength shadows can be broken yet visually subtle. Set SHADOW_STRENGTH to 0.0, use CLASSIC_SHADOW_DEBUG=1 to render raw sun visibility, and A/B against CLASSIC_SHADOWS=0 while counting changed pixels with ImageMagick.