You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If synchronous user code blocks the event loop for an extended or indefinite period of time, it would be useful to be able to capture a stack trace to help fix the issue.
Preferably we should be able to capture a stack trace for the main thread from a worker thread so this can be handled in JavaScript.
What is the feature you are proposing to solve the problem?
The diagnostic report is almost there but it has a few issues:
When this feature was brought into core, it didn't retain the watchdog thread that allowed it to interrupt via signal and capture a stack trace from the main thread. The signal handling is now in JavaScript so it is only called if or when the event loop becomes unblocked, by which time the call stack is not relevant. Does anyone have context as to why it was done this way?
Report is only to file or stdout 😢
The diagnostic report does collect stack traces from worker threads because it interrupts them.
The text was updated successfully, but these errors were encountered:
What is the problem this feature will solve?
If synchronous user code blocks the event loop for an extended or indefinite period of time, it would be useful to be able to capture a stack trace to help fix the issue.
Preferably we should be able to capture a stack trace for the main thread from a worker thread so this can be handled in JavaScript.
What is the feature you are proposing to solve the problem?
Improve the diagnostic report feature?
What alternatives have you considered?
Inspector API
You can pause and capture stack traces via the inspector API but it's often not suitable for production usage.
error.stack
formatDiagnostic report API
The diagnostic report is almost there but it has a few issues:
The diagnostic report does collect stack traces from worker threads because it interrupts them.
The text was updated successfully, but these errors were encountered: