SplitScript reference / Language / debug

debug

keyword

debug statement

Keeps a development-only statement in debug builds.

Debug statements, bindings, globals, and debug fn declarations are fully parsed and type-checked in every profile, then erased from release lowering before dependency and reachability discovery. Debug-only names may only be used from debug code. Terminating statements remain rejected. A standalone inspect statement is implicitly debug-only; when its value is consumed, release builds retain the operand and erase only publication. Use print for a chronological diagnostic log and setVariable for meaningful end-user-facing information displayed on the speedrun timer in both profiles.

Examples

Add development-only logging

debug print(`level: {current.level}`)