Skip to content

EU Basic

Codex edited this page Sep 19, 2026 · 2 revisions

Basic IDE Runtime and IDE

Home · BASIC · UO API · A–Z · Examples · Languages

Basic Runtime executes Basic scripts and routes registered UO.* calls to ClassicUO. The embedded development environment is based on Eclipse Theia with the Monaco editor and a Basic language extension.

Script entry point and indexing

SUB Main()
    UO.Print('Hello from Basic')
END SUB

When a document is opened or changed, the entire text is indexed immediately: SUB, FUNCTION, parameters, local and global declarations, API calls, diagnostics, Outline and symbol navigation. Running does not depend on scrolling to the bottom, and Main may appear anywhere in the file.

IDE areas

  • Explorer — files and the selected script instance;
  • Editor — Basic source;
  • OutlineSUB and FUNCTION of the selected file;
  • Problems — diagnostics with source navigation;
  • Output / Debug Console — chronological messages;
  • API Inspector — documentation for the selected Runtime symbol;
  • Variables / Watch / Call Stack — captured debugger values and frames;
  • API Manual — the complete registered Runtime catalogue.

Panels can be resized and detachable areas continue rendering even when another panel is active. Closing the IDE window does not stop scripts while the ClassicUO Runtime is still running; reopening the IDE must restore their current state.

Multiple scripts and state colors

Multiple scripts can run in parallel with independent running, paused, stopped and debugging states. Selecting one script does not change another. The marker beside a script is green while running, yellow while paused, and black/normal theme color when selected and stopped.

Run and debug commands

Action Key Behavior
Run Current Script F5 validate and run the current script
Start Script (SUB Main) / Run Without Debugging Ctrl+F5 run SUB Main() without debugger stops
Start Debugging F4 run SUB Main() under the debugger
Validate F6 check syntax without running
Pause/Resume Current Script F7 pause or resume the selected instance
Continue F8 continue after pause or breakpoint
Toggle Breakpoint F9 add or remove a line breakpoint
Step Over F10 execute the current instruction
Step Into F11 enter a called user SUB or FUNCTION
Step Out Shift+F11 finish the current procedure and return
Stop Shift+F5 stop the selected instance
Restart Debugging Ctrl+Shift+F5 restart the selected script under the debugger
API Documentation for Symbol Ctrl+F1 open documentation for the symbol at the caret

Run also contains actions for pausing or stopping all suitable instances. A gray command is not applicable to the current Runtime state.

Debugger behavior

Step commands become meaningful after the debugger stops on an instruction or breakpoint. The executable source line is highlighted. F10 follows actual executable statements rather than merely moving the caret to the next visual line. Exact locals, globals, watches and frames are available from a stopped snapshot; during continuous execution the inspector can only show the last safely captured state.

Completion and documentation

Completion inserts the full UO.* syntax. A single API selection opens its description; a double click can insert the complete form into the editor. Ctrl-hover appears only while Ctrl is held, wraps long text and remains within the screen.

Cooperative scripts

The Runtime uses isolated worker contexts, prepared source caching and bounded work on the game thread. Scripts must still yield inside repeated work:

SUB Main()
    WHILE UO.GetDead() = 0
        ' Perform a small unit of work
        UO.Wait(100)
    WEND
END SUB

An unbounded busy loop can consume CPU and make the client unresponsive.

Clone this wiki locally