Skip to content

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

Merged
carlossanlop merged 1 commit into
dotnet:release/7.0from
thaystg:thays_backport_78651
Jan 5, 2023
Merged

[release/7.0][wasm][debugger] Improvements in debugging in async methods#79542
carlossanlop merged 1 commit into
dotnet:release/7.0from
thaystg:thays_backport_78651

Conversation

@thaystg

@thaystgthaystg commented Dec 12, 2022

Copy link
Copy Markdown
Member

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
@ghostghost assigned thaystgDec 12, 2022
@ghost

Copy link
Copy Markdown

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
Copy Markdown
Contributor

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

@thaystgthaystg added the Servicing-approved Approved for servicing release label Jan 5, 2023
@thaystg

thaystg commented Jan 5, 2023

Copy link
Copy Markdown
MemberAuthor

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

@carlossanlopcarlossanlop added this to the 7.0.3 milestone Jan 5, 2023
@carlossanlop

Copy link
Copy Markdown
Contributor

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.0Jan 5, 2023
@ghostghost locked as resolved and limited conversation to collaborators Feb 4, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Debugger-monoServicing-approvedApproved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@thaystg@carlossanlop@radical