Sun Studio

Execution and debugging

Run files, selections and sections in one persistent session, then debug the actual source.

01

Files, selections and sections

The Run button executes the whole active source file. Ctrl+Enter (Cmd+Enter on macOS) executes selected text, or the current %% section when there is no selection. Ctrl+Shift+Enter executes the whole file. Selection and section toolbar controls are also available.

Sections start with %% at the beginning of a line, allowing indentation. Markers inside strings are ignored. A selection must contain complete statements; Studio does not automatically execute setup sections or reset the Workspace. Diagnostic positions remain aligned with the original document.

Sun
%% Setup
x = linspace(0, 2*pi, 100);

%% Analysis
y = sin(x);
plot(x, y);
02

Shared session

Scripts, selections, sections, the console and Canvas blocks share variables and registered functions in the same engine session. Changes made in one surface are visible in the others. Run setup first when a later section depends on its variables.

The engine is selected from the configured executable, then SUN_BINARY, then automatic local, bundled or PATH candidates. Packaged Studio includes a motor; normal installed use does not require Cargo. Engine capabilities govern availability of newer features.

03

Debugger

  • F5 starts debugging or continues; Shift+F5 stops.
  • F9 toggles a source breakpoint; F10 steps over, F11 steps into, and Shift+F11 steps out.
  • F6 checks source without executing it. Checking is not transitive dependency linking.
  • Paused frames expose the actual source and local variables. A runtime error without a source position remains unpositioned rather than being assigned a guessed line.
  • External function breakpoints become verified when their source loads. Save helper files first: a changed file has a new source identity, and an older or unsaved breakpoint is not silently reused.

Sun is proprietary software under experimental development. Documentation scope: Sun 0.6 development snapshot.