GameDebug

Methods

.define(tag, registry)

A visual condition-tree debugger that shows all elements with when-* attributes as nodes in a graph, colour-coded by pass/fail state. Updates live as signals change.

Place as a child of <game-shell>. Toggle with F2 or by setting the open attribute. The debug panel appears as a fixed sidebar on the right side of the viewport.

Attributes

open
boolean -- When present, the debug panel is visible. Toggle programmatically or via F2.

Features

Keyboard Shortcut

Key Action
F2 Toggle the debug panel

Signal Access

Signal Usage
Shell signals Reads scene, round, score, stats, difficulty, passStreak, failStreak for live state display

Usage

<game-shell id="game" game-id="my-game">
  <!-- game content -->
  <game-debug></game-debug>
</game-shell>

Open it programmatically:

document.querySelector("game-debug").open = true;

The debug panel is intended for development only. Remove or conditionally include <game-debug> in production builds.