dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.63k stars 4.57k forks source link

Debugging Blazor application freezes Chrome (and Edge) #95209

Open dlemstra opened 8 months ago

dlemstra commented 8 months ago

Is there an existing issue for this?

Describe the bug

I have been using Chrome on Windows to debug a web application that uses the .wasm that is compiled by a Blazor application. At some point in time this stopped working. The page that is used to debug the code now freezes when a break point is hit in the C# code but don't know what caused this. It could be a Chrome update but it could also be a change in .NET.

I don't have the expertise to debug this further but I was able to create a small project that can be used to debug this issue.

Expected Behavior

No response

Steps To Reproduce

This issue can be reproduced on Windows with the code in this repository: https://github.com/dlemstra/blazor-debug-issue. To reproduce this issue follow the following steps:

I also noticed there was a work around for this issue to check that work around use the This works link instead. The only difference between those two "buttons" is that one uses window.open and the other one uses <a href />.

And with this repository I am also able to reproduce the issue reported here: https://github.com/dotnet/runtime/issues/95019. Removing the folder %temp%\debug-issue-poc fixes the that problem when it happens.

Exceptions (if any)

No response

.NET Version

8.0.100

Anything else?

Chrome 119.0.6045.160 or Edge 119.0.2151.72.

p.s. I wonder why also uploading a zip of the repository is not allowed? Might be good to still have it if I decide to delete this repository in the future?

ghost commented 7 months ago

Tagging subscribers to 'arch-wasm': @lewing See info in area-owners.md if you want to be subscribed.

Issue Details
### Is there an existing issue for this? - [X] I have searched the existing issues ### Describe the bug I have been using Chrome on Windows to debug a web application that uses the `.wasm` that is compiled by a Blazor application. At some point in time this stopped working. The page that is used to debug the code now freezes when a break point is hit in the C# code but don't know what caused this. It could be a Chrome update but it could also be a change in .NET. I don't have the expertise to debug this further but I was able to create a small project that can be used to debug this issue. ### Expected Behavior _No response_ ### Steps To Reproduce This issue can be reproduced on Windows with the code in this repository: https://github.com/dlemstra/blazor-debug-issue. To reproduce this issue follow the following steps: - Run `start-http-server.cmd` (this requires `python3` to be installed). - Run `start-debugging.cmd` to open Chrome and execute `dotnet run`. - Click on the `This is broken` button that opens a new tab with the debugger. - Set a break point at the following location: ![image](https://github.com/dotnet/aspnetcore/assets/10426229/9399964f-a3cf-4d07-ac4b-4e06964d4c95) - Press the `Invoke dotnet code` button and notice that both tabs are "frozen". I also noticed there was a work around for this issue to check that work around use the `This works` link instead. The only difference between those two "buttons" is that one uses `window.open` and the other one uses ``. And with this repository I am also able to reproduce the issue reported here: https://github.com/dotnet/runtime/issues/95019. Removing the folder `%temp%\debug-issue-poc` fixes the that problem when it happens. ### Exceptions (if any) _No response_ ### .NET Version 8.0.100 ### Anything else? Chrome `119.0.6045.160` or Edge `119.0.2151.72`. p.s. I wonder why also uploading a zip of the repository is not allowed? Might be good to still have it if I decide to delete this repository in the future?
Author: dlemstra
Assignees: -
Labels: `arch-wasm`, `untriaged`, `area-Debugger-mono`
Milestone: -