In February 2024, I first discussed adding a debugger to ArkScript with other devs that were involved in the project at that time. I didn’t know where to start or how it should work ; and about two years later this is now done.
What should it do?
With an ideal debugger, I’d like to be able
- to add a breakpoint in my code, without relying on specific IDEs integration ; a
(breakpoint condition)expression is more portable - to trigger the debugger when there is a runtime error (type error, arity error, assert failed…)
- to have breakpoints in the code but allow them to start the debugger only if we passed a specific CLI flag, eg
arkscript -fdebugger myfile.ark - to spawn a REPL-like shell on a breakpoint / error, that allows users to write ArkScript code to examine what went wrong
- maybe add breakpoints from the debugger, given a file and line