-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Unable to debug Blazor hosted webassembly 3.2.0 from Visual Studio 2019 16.6.2 #22911
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
Comments
Thanks for contacting us. |
I'm having a very similar issue, with exactly the same symptoms, but in my case, a new blank wasm project actually works. It's just my own existing project that I can't get working. I've tried making everything as similar as possible between the two, but it just doesn't work. I also get the same error message when trying the Shift+Alt+D |
@spapaseit had the exact same issue, resolved it by uninstalling Hyper-V. Hopefully it can help you. |
@kollfeldt, thanks for the tip, but unfortunately uninstalling Hyper-V (and restarting) made no difference for me; still having the exact same issue. |
I too have a similar issue. F5 opens the browser and it sits spinning on about:blank and if left will timeout as above. Pressing F12 before the timeout to enter the browser developer tools triggers the blazor webassembly app to load but almost without exception no breakpoints are hit. |
Thanks for the tip, @RealHustengutzel. Unfortunately, it made no difference in my case either. |
I have the same issue, funny enough only on my work pc. When I try it on another one it works as expected. |
Hello folks, There's quite a few different issues reported here. Some of them have been previously reported and will be resolved in the upcoming .NET 5/VS 16.8 release. Some things to note:
I'd recommend trying the latest previews of .NET 5 and VS 16.8 and sharing feedback there. |
SO I can't debug blazor webassembly web apps and you are saying it isn't going to be fixed till November? |
I hope this helps someone. |
@proskilly you mean in the meantime you're waiting on the browser which hangs you just simply open up the console and it suddenly loads? |
@lnodaba Yes that's right. |
Hi All, Aside from some esoteric bits and bobs, i am loving Blazor and the VS2019 environment. Go hard MS. W. |
Thanks for sharing those details, @Will4000. As mentioned, we've been working on a variety of debugging improvements that will ship with .NET5/16.8. To help with triage/resolution, it would be great to open a new issue for each problem you want to report. This will make it easier for us to get any necessary logs/details for your scenario and get to a root cause faster. |
This. So much. Thank you for that tip! I was running a fresh install of .NET 5 Preview 8, the latest VS Code, and a fresh install of google Chrome and getting when trying to launch using a "blazorwasm" type launch config in VS Code. |
Hi @captainsafia, I finally got round to installing VS 2019 16.8 and Preview 8 of .NET 5, but the issue still persists; the behaviour is still exactly the same, even with a fresh Hosted Blazor WebAssembly project. |
Yes i have the similar issue with the latest .net5 preview 8 using blazor wasm. Strangely., when i create a new project, it works and i can debug the code. Then if i were to stop and start it again. It will have the forever spin in chrome. I open a new chrome or ie edge and it works or if i press f12 to debug the page shows but under both circumstances it cant be debugged. Sometimes, after waiting for a long time, when i debug again, it starts working for that run and then fails on subsequent restart. I deleted the bin and obj folder also to no avail. I am using wasm with pwa and chrome 85. Trying edge as the default project browser doesnt allow me to debug but loads the page. |
@rakeshkgsg @spapaseit Can you share your exact version of VS that you are using? You should be able to access it by clicking on the "Preview" label in the top-right of the Visual Studio window. Also, if you code share the contents of the |
I have the same problem on the loading page about: blank and without a definite answer, for more details on my problem at |
@captainsafia, sorry for the delay on this. I'm using
|
same issue, on F5 the browser window remain blank with the spinning loading forever, the only way to go forward is to open the chrome web tools with F12, but in this way the debugger works only in chrome and no breakpoint are hit in visual studio. @captainsafia this is a very priority issue, we need to wait until november release to be fixed?? as is the debug is impossible! |
Second on @Gambero81 . I am using 16.7.3 and this is still an issue. I have tried several of the fixes above and still no luck. |
Same here. Using 16.7.3 no luck on Edge(newest) and Chrome. Can debug with docker but taking ~40s to start each time. |
I have solved this error when I am using Firefox. |
Hello folks -- thanks for your paitence here!
We don't support debugging in Firefox. Our debugging experience relies on the Chrome Debugging Protocol, which is not supported by Firefox. @spapaseit Thanks for sharing the logs. It looks like you are debugging a project that leverages auth. I'm investigating some issues related to debugging apps with an auth dependency. Stay tuned for updates on this front.
This usually happens if the underlying DebugProxy isn't launched. We're working on improving the experience here so that the browser will close and alert the user instead of hanging. |
@captainsafia why the underlying DebugProxy isn't launched? |
@Gambero81 If you are on 3.2, I recommend following these steps to get some helpful logs. |
This seems to still be an issue as of Version 16.8.0 Preview 3.1 (Microsoft.AspNetCore Nuget Pkgs: 5.0.0-rc.1.20451.17). When using IISExpress launch settings profile the debugger does not seem to attach. However, when switching to the project profile (Kestrel) in launchsettings the debugger works as expected. Tried removing the .vs file with no luck. Launch settings in Blazor wasm client and Blazor Server (Host). Microsoft Visual Studio Enterprise 2019 Preview Installed Version: Enterprise Visual C++ 2019 00435-60000-00000-AA196 ADL Tools Service Provider 1.0 ASA Service Provider 1.0 ASP.NET and Web Tools 2019 16.8.442.31521 ASP.NET Core Razor Language Services 16.1.0.2046102+2078c50b948ee8c2e2072fc69f5147b15e456b56 ASP.NET Web Frameworks and Tools 2019 16.8.442.31521 Azure App Service Tools v3.0.0 16.8.442.31521 Azure Data Lake Node 1.0 Azure Data Lake Tools for Visual Studio 2.6.1000.1 Azure Functions and Web Jobs Tools 16.8.442.31521 Azure Stream Analytics Tools for Visual Studio 2.6.1000.1 Bundler & Minifier 2.8.396 C# Tools 3.8.0-3.20458.6+b446afd34759150c2ea3b86ab794104e12e64db1 Common Azure Tools 1.10 Fabric.DiagnosticEvents 1.0 GhostDoc 20.2.20230.0 IntelliCode Extension 1.0 Microsoft Azure HDInsight Azure Node 2.6.1000.1 Microsoft Azure Hive Query Language Service 2.6.1000.1 Microsoft Azure Service Fabric Tools for Visual Studio 16.0 Microsoft Azure Stream Analytics Language Service 2.6.1000.1 Microsoft Azure Stream Analytics Node 1.0 Microsoft Azure Tools 2.9 Microsoft Continuous Delivery Tools for Visual Studio 0.4 Microsoft JVM Debugger 1.0 Microsoft Library Manager 2.1.79+ge3567815aa.RR Microsoft MI-Based Debugger 1.0 Microsoft Visual C++ Wizards 1.0 Microsoft Visual Studio Tools for Containers 1.1 Microsoft Visual Studio VC Package 1.0 NuGet Package Manager 5.8.0 ProjectServicesPackage Extension 1.0 Snapshot Debugging Extension 1.0 SQL Server Data Tools 16.0.62009.04150 Test Adapter for Boost.Test 1.0 Test Adapter for Google Test 1.0 ToolWindowHostedEditor 1.0 TypeScript Tools 16.0.20902.2001 Visual Basic Tools 3.8.0-3.20458.6+b446afd34759150c2ea3b86ab794104e12e64db1 Visual F# Tools 16.8.0-beta.20428.2+068ebd3c599bc5a47163a18b8b90d2fe5517186e Visual Studio Code Debug Adapter Host Package 1.0 Visual Studio Container Tools Extensions (Preview) 1.0 Visual Studio Tools for CMake 1.0 Visual Studio Tools for Containers 1.0 Visual Studio Tools for Kubernetes 1.0 Web Compiler 1.12.394 |
I concur with @chassq, still an issue for me to on Version 16.8.0 Preview 3.1 (Microsoft.AspNetCore Nuget Pkgs: 5.0.0-rc.1.20451.17) as well |
@spapaseit @chassq Can you share your log files. Should be under @markokamin This is a known issue and will be fixed in RC2. |
I'm having this same issue - has anyone found a fix for it? I can provide my logs too if it would help? |
@rasaconsulting-sandy Can you open a new issue with the relevant details and logs? |
Hi - this may or may not be related but.. Debugging works flawlessly when the uris are set to localhost:5000;localhost:5001 However, I am hitting an Api with CORS enabled in the form of *.domain.com (I have no control over the cors policy of this api) so my local uris need to be something like: localhost.domain.com:5000;localhost.domain.com:5001 (Also have the correct hosts file change to make localhost.domain.com point to my machine (127.0.0.1)) (This is using the kestrel server) Any idea what it might be @captainsafia ? |
I had the same issue recently using VS 16.8.1 and saw @Will4000 steps. After deleting that file, debugging start working again. |
Everything was working fine and suddenly I also started getting the error attaching the debuger to Edge. It works with Chrome or Firefox. Microsoft Visual Studio Enterprise 2019, Version 16.8.2 |
The problem for me occurs if I select the Configure For HTTPS option when creating the project. As a workaround, for an HTTPS configured project changing isssettings->sslport to 0 and applicationUrl to only "http://localhost:nnnn" in launchsettings.json solved the issue. I think the debug adapter has an underlying security related problem. |
Describe the bug
I have Visual Studio 2019 16.6.2 installed, along with the .NET Core 3.1.301 SDK and all the necessary Blazor templates.
If I create a brand new Blazor WebAssmbly application, I can run it from Visual Studio by pressing Ctrl+F5 and it opens a new tab on my active browser window and starts fine.
But when I press F5, a new, separate browser window is opened instead of a tab in my main browser window (which is a pity), but the page remains at
about:blank
for a while until an error message appears in Visual Studio:Whether the Blazor WebAssembly application is "Hosted" or not doesn't make a difference.
I've followed the steps in the Enforce HTTPS in ASP.NET Core, but that made no difference either.
If, while waiting for the
about:blank
window to crash, I manually open the client side url on a browser tab, the app loads and the debugger breakpoints are hit.During the short while before it goes on to crash, if I hit Shift+Alt+D I always get the following error:
I get this each and every time, no matter how often I run the command (having closed all browser instances, rebooted, etc)
This happens in both Edge 84 (Edgium) and Chrome.
I should be able to create a new Blazor WebAssembly app and hit F5 on Visual Studio out of the box. What am I missing?
=============== UPDATE ==================
I've just tried using "old Edge" (EdgeHtml) and Firefox as the debug browser in Visual Studio, and both work as expected (meaning that the application at least starts up when pressing F5). The problem apears to be both Chromium-based browsers then...
=============== UPDATE 2 ==================
Removing the
IIS Express
section fromlaunchSettings.json
on the Server project allows VS 2019 to start Kestrel up and that does load the Blazor Wasm app on a new browser window. Shift+Alt+D still fails withUnable to find debuggable browser tab
, though.To Reproduce
Just create a fresh Blazor WebAssembly from Visual Studio and press F5
Further technical details
The text was updated successfully, but these errors were encountered: