-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
print JS stack unexpected signal like ctrl+c #1725
Comments
For reference, tokio has tokio-signal which can be used to intercept signals |
@mhvsa are you working on this issue? |
My rough idea was to install a signal handler in Rust that sets a bool flag. In a separate thread, wait for the flag to be set, then call @mhvsa implemented a ctrl+c handler, but it was rejected by @kevinkassimo because of non-generality. Kevin also talked about resolving TS-side promises. On another note, this is a feature I as a user would dislike because I ctrl+c all the time and want to see me logs, rather than a stack trace. Should this feature be enabled by a command-line flag? |
Just FYI @Cre3per last time I tried it I'm also not particularly interested in implementing this feature. It's quite a lot of work for little gain. |
@bartlomieju Thanks for reporting the outcome of your attempts. I'm running a thread in
This part is working, I see stack frames with line+column numbers. I can't use the local Another idea that crossed my mind was to somehow freeze the isolate in the UPDATE: Callbacks can obtain a scope via UPDATE: Tried getting the |
@Cre3per nice find! Please open a PR to rusty_v8, I will discuss this with @piscisaureus who might be able to advise how to tackle this |
I'm giving up on this issue for the time being. My changes to rusty_v8: denoland/rusty_v8@c811400 The major issues of my implementation in rusty_v8, for anyone interested in continuing:
The real issue I see in this feature request is the general lack of scopes in rusty_v8 callbacks. Relevant comment denoland/rusty_v8#406 (comment) |
We've decided not to do this. The users that need this can use a debugger (V8 inspector) instead. |
Imagine you have the program
If one ctrl+c the process, it would be nice if we printed the JS stack.
The text was updated successfully, but these errors were encountered: