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

[release/7.0][wasm][debugger] Improvements in debugging in async methods #79542

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

thaystg
Copy link
Member

@thaystg thaystg commented Dec 12, 2022

Backport of #78651 to release/7.0

/cc @thaystg

Customer Impact

When a async method has 2 variables with same name in different scopes, the debugger was always getting the value from the last scope, so if it was debugging and paused in a if block, that has an else with the same variable in two blocks, it would show the wrong value for the variable in debugger.
Fixed this for C# and VB, also fixed names of async variables and methods while debugging VB code.
Issues related:
#77031
#77481
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1697672

Testing

Manually tested using a Blazor app, also created unit tests.

Risk

Medium risk, now it's considering the scope of variables in async method, this was completely ignored before.

@thaystg thaystg marked this pull request as ready for review December 12, 2022 15:28
@ghost ghost assigned thaystg Dec 12, 2022
@ghost
Copy link

ghost commented Dec 12, 2022

Tagging subscribers to this area: @thaystg
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #78651 to release/7.0

/cc @thaystg

Customer Impact

When a async method has 2 variables with same name in different scopes, the debugger was always getting the value from the last scope, so if it was debugging and paused in a if block, that has an else with the same variable in two blocks, it would should the wrong value for the variable in debugger.
Fixed this for C# and VB, also fixed names of async variables and methods while debugging VB code.
Issues related:
#77031
#77481
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1697672

Testing

Manually tested using a Blazor app, also created unit tests.

Risk

Medium risk, now it's considering the scope of variables in async method, this was completely ignored before.

Author: thaystg
Assignees: thaystg
Labels:

area-Debugger-mono

Milestone: -

@carlossanlop
Copy link
Member

@thaystg when this is ready, please add the servicing-consider label, then send email to Tactics requesting approval.

@thaystg thaystg added the Servicing-approved Approved for servicing release label Jan 5, 2023
@thaystg
Copy link
Member Author

thaystg commented Jan 5, 2023

I have already sent the email, and it's already approved :)

@carlossanlop carlossanlop added this to the 7.0.3 milestone Jan 5, 2023
@carlossanlop
Copy link
Member

Approved by Tactics (7.0.3).
Signed off by area owner.
No OOB changes needed.
CI failure in dev-innerloop looks unrelated.
Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit 5d51394 into dotnet:release/7.0 Jan 5, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Feb 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Debugger-mono Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants