-
Notifications
You must be signed in to change notification settings - Fork 27
questions for the V8 team #118
Comments
could you clarify what you mean by code map? From the referenced issues, I guess you mean source maps? In general, we don't expose the source map to Javascript, but only use it over the inspector protocol. The inspector, however, should already use the source map when available for all stacks. Some for tracking the async stacks on promises. |
So in both cases the issue at hand is error handling, either stack traces or post-mortem.
Yes, source-maps of course 🤦
For promises the use-case is post-mortem: even when we trigger a core-dump after an unhandled promise rejection, most of the interesting stacks have already unwound. In nodejs/post-mortem#16 there is a discussion on how to overcome this, but IMHO the most natural solution would be for the VM to give us the tools to create a more helpfull core-dump. |
@refack I think this is a good initiative - but if we want V8 folk to take a look at all these we should probably ask questions that are a lot less abstract. |
Also, I think perhaps scheduling a hangout with @nodejs/v8 about the post-mortem case could be beneficial regardless. |
If I can add - Is it possible to take a copy-on-write core dump with V8? If so, how fast is it? |
@benjamingr thats more an OS question |
Ok, I'll write specific use cases... |
re 2). V8's debugger already goes great lengths to predict at reject or throw site whether an unhandled promise rejection will occur, while the stack is still available. This has some false positives though since the prediction cannot be perfect. |
Thank you for the answer @hashseed ! |
Async/await had this from the start. You need to enable the debugger and enable break on uncaught exception to trigger debug break events. |
👍 That is way nodejs/post-mortem promote aysnc/await over promises. |
Is there any way to get the async stack (not trace) of a function in V8 without attaching a debugger? |
@refack kind of, |
This issue has been inactive for a while and this repository is now obsolete. I'm going to close this, but feel free to open another issue in a relevant active repository (TSC perhaps?) and include a link back to this issue if this is a subject that should receive continued attention. |
I wanted to ask the @v8 and @nodejs/v8 people couple few questions:
Thank you.
/cc @nodejs/post-mortem @nodejs/diagnostics
The text was updated successfully, but these errors were encountered: