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

Implementation tips for implementing step/debug features #922

Open
EmmanuelOga opened this issue Mar 21, 2021 · 1 comment
Open

Implementation tips for implementing step/debug features #922

EmmanuelOga opened this issue Mar 21, 2021 · 1 comment

Comments

@EmmanuelOga
Copy link

Hi,

I suspect implementing a stepper debugger would be easier in some ways when doing it on top of the bytecode VM, and I can think of a few ways for doing it ... although I bet it can get trickier than it seems! (thinking of this explanation of how GDB works).

Stepping through the AST interpreter seems somewhat more involved, and I only found some paper describing a smalltalk AST tree walker debugger using some sort of visitor pattern to grant the ability to pause in any given node.

I was wondering what are your thoughts about adding debugging support to Lox and languages in general. I feel like this is a weak area of many languages tooling.

@munificent munificent changed the title [Discussion] Implementation tips for implementing step/debug features Implementation tips for implementing step/debug features May 1, 2021
@EmmanuelOga
Copy link
Author

EmmanuelOga commented Sep 19, 2023

I think adding breakpoints to the interpreter or VM would probably be a lot simpler than implementing a debugger for some executable format. In any case, I found some links that I think this will be educational / informative even though most of them talk about debugging compiled Linux ELF/DWARF executables.

I actually found some of the above links through this article:

a sampling profiler is mostly a really fast, very inflexible, debugger.

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

2 participants