Blazor client side debugging fails

扶醉桌前 提交于 2019-12-07 03:10:38

问题


When trying to debug a Blazor client side app I keep getting the error

Debugging connection was closed. Reason: WebSocket disconnected

I open Chrome with "%programfiles(x86)%\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 https://localhost:50868/ and do not have any extensions installed in Chrome.

I followed the instructions https://docs.microsoft.com/en-us/aspnet/core/blazor/debug?view=aspnetcore-3.0 but no luck.

Have you guys ever faced this situation? Any idea on where I should be looking at?


回答1:


I ran into the same thing. Since your URL contains https://localhost, the underlying issue might the same as in my case: the certificate served by the debugger proxy is unverified, and Chrome appears to quietly refuse to connect as a consequence. (I would therefore argue Chrome's error message is, at best, misleading, and possibly just incorrect.)

Long story short, try loading your Blazor site from the http (non-SSL) endpoint before launching the debugger.



来源:https://stackoverflow.com/questions/56246560/blazor-client-side-debugging-fails

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!