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

Show exception widget for promise rejection #21929

Closed
roblourens opened this issue Mar 3, 2017 · 7 comments
Closed

Show exception widget for promise rejection #21929

roblourens opened this issue Mar 3, 2017 · 7 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Milestone

Comments

@roblourens
Copy link
Member

roblourens commented Mar 3, 2017

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 when reason === 'promise rejection'

@weinand
Copy link
Contributor

weinand commented Mar 3, 2017

Let's do this after I've added support for a "robust reason attribute" to the DAP (currently the "reason" attribute is localized).

@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Mar 3, 2017
@weinand weinand added this to the March 2017 milestone Mar 3, 2017
@weinand weinand assigned weinand and unassigned isidorn Mar 3, 2017
@weinand weinand modified the milestones: April 2017, March 2017 Mar 28, 2017
@weinand weinand added the feature-request Request for new features or functionality label Apr 6, 2017
@weinand
Copy link
Contributor

weinand commented Apr 21, 2017

@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.

@jrieken
Copy link
Member

jrieken commented Apr 26, 2017

@roblourens @weinand While this seems to work the information seems to be pretty useless. I understand that in this case rejection happens with null but at least the error message should talk about 'Rejected Promise' instead of 'Exception has occurred: null'

screen shot 2017-04-26 at 14 33 03

@weinand
Copy link
Contributor

weinand commented Apr 26, 2017

@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 weinand assigned michelkaporin and unassigned weinand Apr 26, 2017
@jrieken jrieken reopened this Apr 26, 2017
@jrieken jrieken removed the verification-needed Verification of issue is requested label Apr 26, 2017
@michelkaporin
Copy link
Contributor

@weinand we do surface description attribute in exception widget. I can see that 'null' is coming from DA for description, and it is surfaced in UI as-is.

@weinand
Copy link
Contributor

weinand commented Apr 27, 2017

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():

2017-04-27_15-16-38
2017-04-27_15-16-04
2017-04-27_15-15-36
2017-04-27_15-15-16

BTW, the missing stacktrace bug is tracked in #25555

@weinand
Copy link
Contributor

weinand commented Apr 27, 2017

To align better with the "inspector" debugger, I've changed the wording from "Rejected Promise" to "Promise Rejection":

2017-04-27_16-50-51

@weinand weinand assigned weinand and unassigned michelkaporin Apr 27, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

5 participants