Debug a Session
Keep the session open while you narrow down the problem. Use the console for runtime messages and the editor for the source location.
Find the failing statement
Section titled “Find the failing statement”- Open RESONON: Open Console and the VSCode Problems panel.
- Evaluate the smallest selection that reproduces the error. Read the first error and its file, line and column.
- Fix that statement, then evaluate it again. For the common messages, use Fix Language Errors.
After a runtime error, earlier statements may already have changed the session. Inspect those changes before re-running a larger selection.
Inspect values and patterns
Section titled “Inspect values and patterns”let motif = [C4 E4 G4 E4].fast(2);show(motif);print(motif.describe());assert type(motif) == "Pattern";Use print() for a value and show() for its inspection output. .describe() exposes a pattern’s
transform chain. To inspect a loaded module, evaluate show(module_alias) against the alias you
imported; compare its exports with the function you meant to call.
Separate routing from playback
Section titled “Separate routing from playback”Open the mixer and routing views. Check whether the track has a pattern and instrument, whether transport is playing, and where the track sends its output. Follow Monitor Levels and Routing for the steps. Use Fix Audio Problems or Fix MIDI Problems when the failure is at the device.
Recover deliberately
Section titled “Recover deliberately”Use PAUSE; to hold your place or STOP; to return to the start. If sound needs to be cut, send
STOP; three times. Use RESET; only when you intend to discard the session, then rebuild it from
the saved source. The error model explains which
changes survive an error.