# Debug commands of @ferret/core

Call with `world.commands.execute(name, args)`; `world.commands.list()` on the running game is the authority. Read from the sources of these packages.

- `commands.list` — every command of this world: -> [{name, description}]
- `game.values` — the values the game exposes to tests and tools (world.expose): {names?: [..]} -> {name: value}
- `host.show` — show a world by name ("main" or one a game created): {name}
- `host.worlds` — the worlds on the shared engine and which one is shown
- `perf.bound` — which side holds the frame: -> {by: cpu|gpu|?, frameMs, gpuMs}
- `perf.enable` — switch the frame profiler on or off: {on} -> enabled
- `perf.report` — where a frame goes, ms a frame by system, the most expensive first: {top?, prefix?} -> {frameMs, frameWorst, rows, own}; `own` is what the game's own code costs in the game's thread, by function, with what would take each off it
- `perf.reset` — clear the profiler
- `perf.trace` — the recorded frames, long tasks and marks: -> {frames, longTasks, marks, done} or null
- `perf.trace.start` — record every frame for a while (the start of a game): {seconds?, minMs?}
- `quality.auto` — switch the regulator on or off: {on} -> on
- `quality.preset` — every knob at a share of its range: {share 0 (richest) .. 1 (cheapest)}
- `quality.report` — the quality regulator: target, measured frame, which side holds it, the knobs and the last decisions
- `quality.set` — put a knob at a level and keep it there ({id, level}), or give it back to the regulator ({id, auto: true})
- `quality.target` — the flat-screen frame rate to hold: {hz}
- `scheduler.info` — the system scheduler: workers, declared kernels, registered kernels, counts: -> {threads, pooled, declared, registered, stats}
- `snapshot.audit` — reads of fields the snapshot spec does not declare (needs the replica made with audit on)
- `world.info` — time, tick count, entity and service counts
- `world.pause` — pause or resume the simulation: {paused}
- `world.step` — run n fixed steps (use while paused): {n}
- `world.timeScale` — set the time scale: {scale}
