enableDebug()
pixi-reels / index / enableDebug
Function: enableDebug()
function enableDebug(reelSet: ReelSet, key?: string): void;
Defined in: debug/debug.ts:272
Enable debug mode: attaches debug utilities to window.__PIXI_REELS_DEBUG.
After calling this, an AI agent can run in the browser console:
__PIXI_REELS_DEBUG.snapshot() // full state JSON
__PIXI_REELS_DEBUG.grid() // ASCII grid
__PIXI_REELS_DEBUG.log() // console.log the grid
__PIXI_REELS_DEBUG.startRecording('myTag')
__PIXI_REELS_DEBUG.stopRecording()
__PIXI_REELS_DEBUG.getFrames('myTag')
For a single reel set, leave key unset. With multiple reel sets, pass a
distinct key per call so they don’t clobber each other on window: each is
reachable at __PIXI_REELS_DEBUG_INSTANCES[key], and __PIXI_REELS_DEBUG
always points at the most recently enabled one for convenience.
This attaches to window and logs — call it only in dev/QA builds, never in
a production bundle (the snapshot exposes internal state and is not
semver-protected, so do not wire monitoring/telemetry to it).
Parameters
| Parameter | Type |
|---|---|
reelSet | ReelSet |
key? | string |
Returns
void