Unbound breakpoint in VS Code when debugging Blazor WASM app on WSL 2
See original GitHub issueDescribe the bug
I cannot set a breakpoint when debugging a WASM app on VS Code (WSL 2) following the instructions here: https://docs.microsoft.com/en-us/aspnet/core/blazor/debug?view=aspnetcore-3.1
To Reproduce
- Create a new WASM project: dotnet new blazorwasm -o Foo
- Follow VS Code debugging instructions here: https://docs.microsoft.com/en-us/aspnet/core/blazor/debug?view=aspnetcore-3.1
- Set a breakpoint in the IncrementCount method in the Counter component (Counter.razor).
Expected: Breakpoint resolves Actual: Unbound breakpoint
Debug Console output from .NET Core Debug Blazor Web Assembly In Chrome:
Note: Using the “preview” debug extension null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. null: Uncaught DOMException: Entry already exists. [48;5;127m[38;5;231mblazor Loaded 4.59 MB resources This application was built with linking (tree shaking) disabled. Published applications will be significantly smaller. mono_wasm_runtime_ready fe00e07a-5519-4dfe-b35a-f867dbaf2e28 null: Uncaught DOMException: Entry already exists.
If I expand one of the Uncaught exceptions above, I see following:
u @ localhost꞉5001/_framework/blazor.webassembly.js:1:45332 ◀ Promise.then ▶ s @ localhost꞉5001/_framework/blazor.webassembly.js:1:45401 a @ localhost꞉5001/_framework/blazor.webassembly.js:1:45263 ◀ Promise.then ▶ s @ localhost꞉5001/_framework/blazor.webassembly.js:1:45401 <anonymous> @ localhost꞉5001/_framework/blazor.webassembly.js:1:45411 r @ localhost꞉5001/_framework/blazor.webassembly.js:1:45211 e.addToCacheAsync @ localhost꞉5001/_framework/blazor.webassembly.js:1:49122 <anonymous> @ localhost꞉5001/_framework/blazor.webassembly.js:1:49032 <anonymous> @ localhost꞉5001/_framework/blazor.webassembly.js:1:46416 <anonymous> @ localhost꞉5001/_framework/blazor.webassembly.js:1:46521 a @ localhost꞉5001/_framework/blazor.webassembly.js:1:45267 ◀ Promise.then ▶ s @ localhost꞉5001/_framework/blazor.webassembly.js:1:45401 a @ localhost꞉5001/_framework/blazor.webassembly.js:1:45263 ◀ Promise.then ▶ s @ localhost꞉5001/_framework/blazor.webassembly.js:1:45401 <anonymous> @ localhost꞉5001/_framework/blazor.webassembly.js:1:45411 r @ localhost꞉5001/_framework/blazor.webassembly.js:1:45211 e.loadResourceWithCaching @ localhost꞉5001/_framework/blazor.webassembly.js:1:48588 e.loadResource @ localhost꞉5001/_framework/blazor.webassembly.js:1:47125 <anonymous> @ localhost꞉5001/_framework/blazor.webassembly.js:1:36314 <anonymous> @ localhost꞉5001/_framework/blazor.webassembly.js:1:35494 <anonymous> @ localhost꞉5001/_framework/blazor.webassembly.js:1:35599 <anonymous> @ localhost꞉5001/_framework/blazor.webassembly.js:1:34512 r @ localhost꞉5001/_framework/blazor.webassembly.js:1:34289 p.instantiateWasm @ localhost꞉5001/_framework/blazor.webassembly.js:1:36194 createWasm @ localhost꞉5001/_framework/wasm/dotnet.3.2.0-preview3.20168.1.js:1:18234 <anonymous> @ localhost꞉5001/_framework/wasm/dotnet.3.2.0-preview3.20168.1.js:1:184118
Further technical details
- ASP.NET Core version
- Include the output of
dotnet --info
- The IDE (VS / VS Code/ VS4Mac) you’re running on, and it’s version
Environment:
- VS Code: 1.43.2
- C# Extension: 1.21.16
- JavaScript Debugger (Nightly): 2020.4.317
- JavaScript Debugger Companion: 0.0.4
- Chrome: 78.0.3904.130
- WSL 2.0 on Windows 10: 19592.1001
dotnet --info:
.NET Core SDK (reflecting any global.json): Version: 3.1.201 Commit: b1768b4ae7
Runtime Environment: OS Name: ubuntu OS Version: 18.04 OS Platform: Linux RID: ubuntu.18.04-x64 Base Path: /usr/share/dotnet/sdk/3.1.201/
Host (useful for support): Version: 3.1.3 Commit: 4a9f85e9f8
.NET Core SDKs installed: 2.2.402 [/usr/share/dotnet/sdk] 3.1.201 [/usr/share/dotnet/sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.2.7 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.2.7 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.2.7 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (5 by maintainers)
Top GitHub Comments
I ran into the same issue I think when setting up a brand new install. Looks like possibly some https issue. I was able to get debugging working in VS Code on Ubuntu using http instead of https.
In launch.json under the “.NET Core Debug Blazor Web Assembly in Chrome” launch configuration, change url to “http://localhost:5000”
Full launch config
I’ll close this issue as a dupe of #21466 as the issue with the DebugProxy not being launched is a result of issues with making inbound requests to the WSL.
It’s likely that the issues that are resolved by accepting local dev certs happen in WSL instances that are already configuring to support arbitrary inbound connections.
If folks still have issues with this that aren’t related to the above, please open another issue. It makes it easier to debug and peel out different issues.