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

Blazor WASM "Debug Adapter" fail to handle breakpoints when a Web Worker is present #98208

Open
1 task done
mattincode opened this issue Feb 7, 2024 · 4 comments
Open
1 task done

Comments

@mattincode
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When a Web worker is created in a Blazor WebAssembly project the debugger(Visual Studio 2022) will stop working since the "Debug Proxy" seems to disconnect. Once the web worker is active unset/set breakpoints in Visual Studio 2022 will display Unable to retrieve source content.
example project: BlazorWasmDebugBrokenWithWebWorker

Expected Behavior

The breakpoint in Visual Studio 2022 should be set without any error message.

Steps To Reproduce

How to reproduce

  1. Run the example project in the VS2022 debugger.
  2. Open the "Counter"-page <- This will create a web worker
  3. Set a breakpoint in the "IncrementCount" method
  4. Click the "Click me" button.
  5. The breakpoint will be hit -> Press "continue" in the VS2022 debugger.
  6. Uncheck the breakpoint and then set it again on the same line.

Result

The debugger will stop in javascript and display Unable to retrieve source content

Expected result

The breakpoint should be set without any error message.

Exceptions (if any)

No response

.NET Version

8.0.101

Anything else?

No response

@javiercn javiercn transferred this issue from dotnet/aspnetcore Feb 9, 2024
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Feb 9, 2024
@ghost
Copy link

ghost commented Feb 9, 2024

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

Issue Details

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When a Web worker is created in a Blazor WebAssembly project the debugger(Visual Studio 2022) will stop working since the "Debug Proxy" seems to disconnect. Once the web worker is active unset/set breakpoints in Visual Studio 2022 will display Unable to retrieve source content.
example project: BlazorWasmDebugBrokenWithWebWorker

Expected Behavior

The breakpoint in Visual Studio 2022 should be set without any error message.

Steps To Reproduce

How to reproduce

  1. Run the example project in the VS2022 debugger.
  2. Open the "Counter"-page <- This will create a web worker
  3. Set a breakpoint in the "IncrementCount" method
  4. Click the "Click me" button.
  5. The breakpoint will be hit -> Press "continue" in the VS2022 debugger.
  6. Uncheck the breakpoint and then set it again on the same line.

Result

The debugger will stop in javascript and display Unable to retrieve source content

Expected result

The breakpoint should be set without any error message.

Exceptions (if any)

No response

.NET Version

8.0.101

Anything else?

No response

Author: mattincode
Assignees: -
Labels:

area-Debugger-mono

Milestone: -

@mattincode
Copy link
Author

@tommcdon What is the reasoning behind setting issue #97987 as related?
There is no information in that issue to indicate any Web Worker beeing present.
Also, in that issue it "magically" resolved itself as is not the case with a Web Worker that will break the debugger 100% of the time.
Since Microsoft has pushed multithreading for Blazor into the future the only way to do any form of background work is to use Web Workers. Since Web Workers break debug this issue is currently a big hurdle doing any effective development.
Any timeline for when this issue can at least hit a triage process?

@tommcdon tommcdon added this to the 9.0.0 milestone Feb 26, 2024
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Feb 26, 2024
@tommcdon
Copy link
Member

@tommcdon What is the reasoning behind setting issue #97987 as related? ...

Hello @mattincode! My statement in #97987 (comment) caused GH to "link" the issue. My statement suggests that there may be a relation between the two, but without a concrete details understanding the technical reason for the failure, we don't know what the root cause is yet.

Any timeline for when this issue can at least hit a triage process?

My apologize for the delay in investigation. Our team is actively investigating top customer issues and we have already put this issue on to our backlog for further investigation.

@lewing lewing modified the milestones: 9.0.0, Future Apr 26, 2024
@michelkommers
Copy link

There is a workaround for this? Or only wait for a fix? The issue is still present in latest releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants