runtime: [wasm] Log when source files fail to be loaded into DebugStore
I have a .NET 5.0 (previously .NET Core) application using the Blazor hosted model. Thus, my solution is comprised of three projects - Client, Server, and Shared (I believe this is what you get when you use the ‘Progressive Web’ option on creation).
I am trying to debug some Okta OAuth issues in my client application, however I can’t seem to get the debugger to hit any breakpoints in the client. Server breakpoints work fine. I can see client exceptions in the console tab of Edge, but I can’t debug into them.
I am launching the debugger in Visual Studio 2019 through the server project (have also tried launching the client). I do have the “inspectUri” entries in appsettings.json of both client and server projects. I am using Edge Chromium for my browser, and it is up to date. I have also tried with Chrome.
I was hoping I could create a new Blazor application of the same type, and compare to see why mine doesn’t work. However, after creating a new .NET Blazor hosted solution using the Visual Studio template, I cannot hit breakpoints in its client project either.
The breakpoint will not currently be hit. Unbound breakpoint.
Visual Studio 2019 16.8.5 on Windows 10. Tried using VS 8.8.8 on my MacBook in OSX and have the same problem. Attempted to debug in VS Code on Windows but couldn’t get the debugger to launch. Tried reinstalling Visual Studio on Windows 10 machine but the issue persists.
launchSettings.json in Server project:
{ "iisSettings": { "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { "applicationUrl": "http://localhost:59928", "sslPort": 44377 } }, "profiles": { "IIS Express": { "commandName": "IISExpress", "launchBrowser": true, "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }, "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}" }, "WFBC.Server": { "commandName": "Project", "launchBrowser": true, "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", "nativeDebugging": false, "applicationUrl": "https://localhost:5001;http://localhost:5000", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } }, "Docker": { "commandName": "Docker", "launchBrowser": true, "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", "publishAllPorts": true, "useSSL": true } } }
In client project (not sure if this one matters):
{ "iisSettings": { "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { "applicationUrl": "http://localhost:5001", "sslPort": 44343 } }, "profiles": { "IIS Express": { "commandName": "IISExpress", "launchBrowser": true, "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }, "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}" }, "WFBC": { "commandName": "Project", "launchBrowser": true, "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }, "nativeDebugging": true, "applicationUrl": "https://localhost:5001;http://localhost:5000", "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}" }, "Docker": { "commandName": "Docker", "launchBrowser": true, "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", "publishAllPorts": true, "useSSL": true } } }
Debug output:
info: Microsoft.Hosting.Lifetime[0] Now listening on: https://localhost:5001 info: Microsoft.Hosting.Lifetime[0] Now listening on: http://localhost:5000 info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down. info: Microsoft.Hosting.Lifetime[0] Hosting environment: Development info: Microsoft.Hosting.Lifetime[0] Content root path: C:\dev\WFBC\wfbc.page\Server Hosting environment: Production Content root path: C:\dev\WFBC\wfbc.page\Server Now listening on: http://127.0.0.1:54549 Application started. Press Ctrl+C to shut down.
To reproduce: create a new Blazor project in Visual Studio with the .NET Core Hosted and Progressive Web Application options selected. Try to debug into the client project.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 20 (10 by maintainers)
I have been struggling with this as well. I have a few projects linked to my blazor .net 5.0 project that are still targeting .net standard 2.1. I can debug anything in these libraries. But as soon as I step out of these libraries the debug jumps into this mess of dotnet.5.0.4.js file.
Blazor Client wasm targeting .net 5.0 (can’t debug client side) Dependent Library targeting .net standard 2.1 (able to debug client side