Repository navigation
feat: the debugger links to the game, holds the script and steps it - #23
Merged
Merged
Conversation
The plan for the debugger and its link to the game (#5), before it's built: what it does and shows, the editor link's messages it uses, what the editor checks itself, how it fits the editor's modules and the game's profile, what OpenReliant still needs, and the stages to make it in. The Settings' Editor link page gets its design page and picture.
The first stage of the debugger's design: the editor links to OpenReliant over its editor link, places line breakpoints in the game's script by the build's map of statements, shows where the game holds the script, and steps it. - Play starts the game with --editor-link and links to it; Link to game links to a game started by hand; Unlink closes the link and the game plays on. - A connection task answers each mission's file with the breakpoints' flags at once, since the game holds the mission's start until they come. - The session matches the game's mission with the build of the text as it is, and places breakpoints and shows holds only while they match. - Breakpoints move to the next line that can hold, and are kept per source file in the settings folder. - Continue, Step over, Step into, Run to cursor and Pause; the held line in the gutter, the outline, the inspector and the toolbar's chip; Threads and Variables from the game's state; the link's states on the toolbar, the status bar and the start screen; the Editor link settings. - The on-screen text is terse: Unlink, Link to game, State polling at 1 Hz or 4 Hz. Closes #5
vdmkenny
added a commit
to OpenReliant/openreliant
that referenced
this pull request
Oct 14, 2026
…#1208) What the editor's debugger ([openreliant-editor#5](OpenReliant/openreliant-editor#5)) needs from OpenReliant: - **The compiler's line map.** `compileMapped` gives, with the mission file, each statement's offset in the script, its line and column, and whether the VM stops before it. `source_parser.buildMapped` parses and compiles with it. - **The link's records.** `link.Hello`, `link.MissionStarted` and `link.State` write OpenReliant's own payloads and read them back, passing over keys they don't know. The game writes them and `openreliant debug` reads them, replacing the hand-parsed fields. The default port moves into the library beside them. - **The start's wait.** While an editor is linked, the mission's start waits for the editor's flags, for a second at most by the clock, checking the link every millisecond, instead of a fixed fifth of a second. Without an editor it doesn't wait. Marked as an improvement. Checked: tests, `make check-missions` (44 missions, 75 bound, the guide's change), and headless with a fake editor that answers the mission file half a second late: mission 1 still stops before its start part's first instruction, with the clock at 0. The editor's [#23](OpenReliant/openreliant-editor#23) builds on it, and its `--check-missions` builds all 44 stock missions again through the mapped build. Left for later: the script's events for the editor's timeline (#1207). Closes #1206
vdmkenny
pushed a commit
that referenced
this pull request
Oct 14, 2026
🤖 I have created a release *beep* *boop* --- ## [0.1.0](v0.0.1...v0.1.0) (2026-10-14) ### Features * the debugger links to the game, holds the script and steps it ([#23](#23)) ([a467fb6](a467fb6)), closes [#5](#5) ### Documentation * where to get the editor and what it needs ([#16](#16)) ([523d384](523d384)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first stage of the debugger's design, which this PR adds with its Editor link settings page: the editor links to OpenReliant, holds the mission's script at line breakpoints, and steps it.
--editor-linkand links to it, Link to game links to a game started by hand, and Unlink closes the link while the game plays on. The link's state shows on the toolbar's chip, the status bar and the start screen.Checked: tests including a game made of messages over TCP,
make check,--check-missionsover the 44 stock missions, and the real game headless, holding mission 90's start part at a breakpoint.Depends on OpenReliant/openreliant#1208:
build.zig.zonpins its head, to repin to main once it merges.Left for later: conditions, log points and Watch (#19), the timeline (#20), the live scene (#21) and live changes (#22).
Closes #5