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

Any plan to add settrace() functionality to VM? #415

Open
shiyuge opened this issue Mar 4, 2023 · 0 comments
Open

Any plan to add settrace() functionality to VM? #415

shiyuge opened this issue Mar 4, 2023 · 0 comments

Comments

@shiyuge
Copy link
Contributor

shiyuge commented Mar 4, 2023

Normally interpreted languages provide a mechanism for users to register a function that will be called at specific events as program runs, such as function calls and returns. For example, Python provides sys.settrace() and Lua provides debug.sethook().

These hooks are really one of the best features of an interpreted language: you get the chance to inspect the internal state of the VM in your script. These hooks can then be further utilized to build other high level interesting things, such as debugger, inspector, or to collect code coverage.

I would like to contribute such a functionality.

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

No branches or pull requests

1 participant