Repository navigation
Conversation
/transactions/{hash}/debug/{purpose}/{index} replays one script run in julc's VM with exactly the
context the Scripts tab used, and lets you move through it:
- step, step over, step out, continue, step back, start/end; a timeline to click or drag, with
trace and failure markers; keyboard shortcuts
- breakpoints on UPLC lines (click a line number), builtins, traces and failures
- the current term highlighted in the UPLC and followed vertically and horizontally
- now (phase, term, value, why it stopped), budget at the step against the run and the declared
ex-units, environment, frames and traces so far
- ?step=N links to an exact machine state; ?at=failure opens at the failing step
- "Debug" / "Debug the failure" links on every re-run in the Scripts tab
The re-run pipeline moved to replay/run.ts so the tab and the debugger share it, and every result
keeps the VM arguments it was run with. The transaction loader moved to $lib/tx/load.server.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
55 of 72 tasks
|
Initial automated review · Aster Hi @satran004, thanks for the PR! 🙏 This is an automatic first check by an AI reviewer. It does not replace maintainer review and may be wrong. Reviewed commit: Issues found:
Not tested: Static review only; build, unit and browser tests were not run, and no CI checks were reported for this commit. |
This branch has not been deployed
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.
Stacked on #208. Part of #207: PR 3 of the Script Lab series, the time-travel debugger.
What users get
/transactions/{hash}/debug/{purpose}/{index}replays one script run of any transaction in julc's VM, on Mainnet or a devnet. It uses exactly the context the Scripts tab showed, including the julc#244 corrections, so the run you debug is the run you saw.→step,←back,↓over,↑outCcontinue,Ffailure,Home/End?step=Nopens an exact machine state, and "Link to this step" copies it.?at=failureopens at the failing step.Stepping is fast: on a 430M-CPU Mainnet withdraw-zero validator (23,605 machine steps), every action, jumps included, takes 1–4 ms. Opening the debugger, which rebuilds the transaction, starts the engine and replays, takes about 3.5 s on the playground store.
How
replay/run.ts: the re-run pipeline (rebuild → evaluate → context fixes → re-evaluate) moved out of the Scripts tab, so the tab and the debugger share it. Each result keeps the VM arguments it ran with.debug/Debugger.svelte:vm.debugsession with those arguments;timelineaction;totalSteps(the last step is the finished state: result and full budget);replaceState.debug/Timeline.svelte: the scrubber.CodeViewgainedactive(span highlight and follow) and line-number breakpoints.$lib/tx/load.server.ts: the transaction loader, shared by the transaction and debugger pages.Not included
Tests
npm run check: 0 errors, 0 warnings.script-lab.spec.ts: all 3 tests pass against a production build in Chrome. The new one covers stepping, URL sync, End, a builtin breakpoint, and a?step=5link.(delay (error))🤖 Generated with Claude Code