-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[wasm][debugger] Fix pause on exception behavior #58728
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
[wasm][debugger] Fix pause on exception behavior #58728
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. Just a few questions, and suggestions.
//we only need this check if it's a non-vs debugging | ||
if (sessionId == SessionId.Null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this checking for non-vs debugging?
And does SessionId.Null
represent a default context, which might have an entry in contexts
dictionary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I could see by debugging, when I'm debugging from VS SessionId is not null, when I'm debugging from chrome SessionId is null.
Maybe @lewing knows how to explain better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, the non-null sessionId means that it is a "flat access".
IIUC, chrome devtools will move to it too, so this might not be a good test. I'll defer to @lewing .
Co-authored-by: Ankit Jain <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except that question about the sessionId, LGTM!
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1218488704 |
The initial status of Pause On Exception is correctly sent to BrowserDebugProxy when the debugging is started from VS. So we don't need the hacky to discover the initial status. And we will not print the message described in the issue below anymore.
When we debugging from chrome this is still useful, but I couldn't hide the message printed on console.
Added more tests when throwing an Exception and not a CustomException as we were testing in the unit test before.
Fixes #58509 (comment)
@lewing I would like to backport to preview 2, do you think that makes sense?