Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive debugger #196

Open
Idorobots opened this issue Jun 24, 2024 · 0 comments
Open

Interactive debugger #196

Idorobots opened this issue Jun 24, 2024 · 0 comments

Comments

@Idorobots
Copy link
Owner

Idorobots commented Jun 24, 2024

Given that the trampoline is made explicit with #190, it should now be fairly easy to introduce a version that allows stepping through the continuations in the REPL.

A call to (breakpoint) will yield a marked resumable and cause the original trampoline to exit. That return is trapped by the debugger trampoline, which allows a step-by-step execution with REPL commands:

  • ;step - executes the resumable once.
  • ;step-over - executes the resumable until a new function call appears on the call trace*
  • ;trace N - show the N most recent calls in the call trace
  • ;run'- resumes with the usual trampoline
  • ;back - resets the computation to the last breakpoint
  • ;reset - resets the computation to beginning

For inspecting the stack-trace, a separate call-trace can be used - should store the active function frames in a ring buffer in debug-compiled code (#197).

REPL should also trap Racket execution breaks and treat these as breakpoints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant