Skip to content

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.

  1. Open RESONON: Open Console and the VSCode Problems panel.
  2. Evaluate the smallest selection that reproduces the error. Read the first error and its file, line and column.
  3. 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.

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.

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.

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.