inspect-runtime

Installation
SKILL.md

Inspect a running app

From Engine 2.23, every app announces itself to a hook at globalThis[Symbol.for('playcanvas.inspector')]. Read live state through it instead of adding window.app or debug code to the app.

Attach

  • Resolve scripts/devtools-hook.js relative to this skill and inject it as an init script that runs before any page script. A hook defined later misses existing apps; reload instead.
  • Page code then reads globalThis.__playcanvasApps, a Map from each live app to { version, revision, protocol }. app.init() adds the entry and app.destroy() removes it.
  • The script chains a hook defined before it, such as a devtools extension's.
  • No entry means the Engine predates 2.23, the hook loaded late, or the app set devtools: false. The Engine swallows errors thrown by the hook.
  • In 2.23.0 only the debug build (playcanvas/debug, build/playcanvas.dbg.*) announces apps; the default import never calls the hook. Later 2.23 patches fix every build.

Read state

Installs
74
GitHub Stars
25
First Seen
13 days ago