Run the runtime
vm_runAdvance a headless Scratch VM and get a state snapshot plus an ordered event timeline, enabling sequence assertions on sprite positions, variables, lists, broadcasts, and errors.
Instructions
Advance the headless VM, then return a state snapshot. By default it runs in real time until every script finishes (so waits, timers and glides behave) or the budget elapses. Returns sprite positions, variables, lists, monitors, say/think bubbles, any pending question, running-thread count and errors. Also returns events: the ordered timeline of what happened since the previous vm_run (say/think, broadcasts, question/answer, errors), so you can assert on sequence, not just final state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paced | No | Sleep one frame between steps so time-based blocks elapse (default true). Set false to step as fast as possible. | |
| frames | No | Frame budget instead of `seconds` (1 frame ≈ 1/30 s). | |
| seconds | No | Real-time budget in seconds (default 10, max 60). | |
| untilIdle | No | Stop early once no scripts are running (default true). |