-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Show exception widget for promise rejection #21929
Comments
Let's do this after I've added support for a "robust reason attribute" to the DAP (currently the "reason" attribute is localized). |
@roblourens I'm a bit reluctant to hardcode an additional StoppedEvent reason into the VS Code frontend. Could you try to use "exception" reason for promise rejections and use the new "description" attribute for conveying the "Promise Rejection" to the UI? With the "robust reason attribute" work "reason" is no longer shown in the UI if a "description" attribute is present. |
@roblourens @weinand While this seems to work the information seems to be pretty useless. I understand that in this case rejection happens with |
@michelkaporin we do not seem to show the "description" attribute when it's available. Its value would be "Promise Rejection" in this case (and this already shows in the CALL STACK view). The "description" should take precedence over the fallback message "Exception has occurred". |
@weinand we do surface |
Ok, I've tweaked the use of the "description" attribute in node-debug. Here is how it looks now for different values passed to reject(): BTW, the missing stacktrace bug is tracked in #25555 |
I set different StoppedEvent reasons for exceptions vs promise rejections, and we should show the exception widget for promise rejections too. From #21905
It seems like it's currently only shown when
reason === 'exception'
, but it should be shown either whenever the exception text is set, or whenreason === 'promise rejection'
The text was updated successfully, but these errors were encountered: