-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Microsoft Visual Studio Failed to launch debug adapter 'Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.ProtocolException #28113
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
I should also mention that, I have seen a few references to this issue, and apparently it was fixed in RC2 - but for me, this does not appear to be the case :-/ |
Additional note: I found what looks to be an identical issue (all be it with not so much detail) reported on the visual studio developer community site, so I also added some detail to it there (like the above logs) https://developercommunity.visualstudio.com/content/problem/1262285/exception-of-type-microsoftvisualstudiosharedvscod.html |
Cause: I found setting my default browser (on windows 10, under default apps) to "Chrome" instead of "Edge", and then restarting VS, fixes this issue. It seems Chrome is a pre-requisite of debugging - perhaps because I have a blazor wasm project in the solution? I think if this is the case, more should be done to pre-empt this and prompt the user to check their default browser or something similar - in lieu of actually supporting Edge (or other browsers) |
@dazinator glad that you've been able to solve this. |
@mkArtakMSFT |
Got the same exception with chrome |
Same exception with Edge (Chromium based) |
@dazinator thanks for the additional details. Does this happen in a brand new project too? |
Confirm the isuse with Edge Chromium 87.0.664.47, Chrome 86.0.4240.198, but Firefox 82.03 runs. |
@javiercn |
@dazinator You might perhaps missed some migration steps, that's why it's important to check if an out of the box template works. |
@javiercn it does happen for new projects also. I started with no browser open, launched from VS (2019 Pro 16.8.2) -> it works. The screen shot shows the browser window hanging round from first debug session which launched, but then there was a browser error starting blazor. I stopped VS, and the browser window remained. In the second tab is the second attempt at launching a debug session, a new window opened, then I see the error reported and the debug session terminates, leaving another new orphaned tab. If I close all tabs and start from scratch it works. |
Thanks for contacting us. |
I have the same problem, Chrome window opening but no blazor app loading. |
Had the same problem with Chrome/Edge and netcoreapp3.1 (not 5!). Changing to Firefox worked. It appeared suddenly during work, so I thought my changes in code or the new Resharper feature DPA, which I turned on shortly before, is responsible, but it turned out that deleting the .suo file solved the problem. HTH. |
@chrisret Delete of .suo file helped. I have also updated Resharper. |
Same here. VS Enterprise 2019 (16.8.3). WASM Blazor project. Work in FF. Fails in Edge and Chrome. I had VS Code installed with both debug Extensions. Now it is uninstalled. Maybe that causes the issue. |
Neither IIS express nor the other one works... |
Tried all of the above, nothing works, tried a brand new WASM template, it does not work out of the box, it will not stop on any breakpoints I am running:- Microsoft Visual Studio Community 2019 Version 16.9.4 I have Edge, Chrome and Firefox installed none of them stop on the breakpoints, all fire up the app properly but no breakpoints are hit. I have tried cleaning the projects, deleting the bin and obj folders from all projects, deleting the .vs folder, I have script debugging off, all projects are set to debug, the app works but debugging is not hitting any breakpoints at all. |
Same issue for me. Visual Studio Entrerprise 16.9.4 With IISExpress the browser is stuck on the "about:blank" page and after a while I get the following error: I have tried all workarounds without success. |
I am going to install a VM tonight of windows 10 tonight, put just visual studio on in, use the standard template and see if that works. |
I have now installed a completely fresh version of windows 10, updated it, installed visual studio community edition, created an app from the WASM template and it does not hit the breakpoints, this is now 3 PC's and one MAC not debugging ASP.NET projects at all. Steps to reproduce install all of the above create a new app based on the WASM template, stick a break point on the following line. forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("WeatherForecast"); it loads that data without breaking on the breakpoint. |
@AlexW68 Apologies this has been so problematic. To help diagnose this, could you try setting the breakpoint on the first line inside the “increment count” method in the Counter.razor file, and see if the breakpoint hits when you click the button? |
Hi Steve, Thanks for the reply, it hits the breakpoints on a new project new vm, old project on an old computer if I copy the counter.razor component into the project and set a breakpoint. So that works sometimes I get the following error bubble up through to the browser Unhandled exception rendering component: '<' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0. System.Text.Json.JsonException: '<' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0. ---> System.Text.Json.JsonReaderException: '<' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0 I can set a breakpoint and hit it in the API function server side that seems to work ok. What I am also not able to do when this seems to happen is try catch blocks round the API calls and capture the error it does not seem to want to bubble the error into the client side WASM for some reason. I did note (and this maybe something completely different) that in another project I set breakpoints, they hit every now and again, then stop debugging and restart and the breakpoints are then not solid red but a red outlined dot, once you are into that module/component you can click it twice to make it solid red. Thanks for your help I know you guys are busy, but this is really busted at the moment. (don't think it matters but all the firewalls are switched off) |
Testing this some more that project has now failed, the counter breakpoint still works, but I am finding that if the breakpoint is set inside the api (server app) the breakpoint may get hit on the client side. In the past clearing the bin/obj folders has helped with these types of issues, this does not seem to work now. Also changing the api code to the following seems to make the breakpoints more reliable
This way I can see what is being returned before it's passed back to the client. |
Hi guys, I tried all the workarounds and the only one that worked for me successfully was to remove .vs from the project folder. |
Just to give some more detail, this is the error i get in "visualstudio-js-debugger.txt" file: |
Tried the preview version of Visual Studio problem still exists there too. Here is a small video, this is a basic windows 10 VM with visual studio preview on it, the https and other options really make no difference to if it's going to work reliably or not, I am happy working with alpha builds and helping working through this problem, if I am guided to test certain things. https://twitter.com/alexwhitegb/status/1393457907505799169?s=21 |
This morning I updated to visual studio preview 4 Microsoft Visual Studio Community 2019 Preview deleted the .vs folder, deleted all the bin and obj folders my project initially only debugged inside the api calls (server side) then the client side stuff just started working after a while, I have not been able to pause on the client side api call line for more than 2 weeks so something has changed. I have seen a pattern and it's reliable, if you have two api calls on the client side and put breakpoints on both, put a breakpoint on the server side api call, it will not break on the initial client side api call first time but once you have broken on the server side api code and stepped through, once you return to the client the breakpoints work from that point onward, so it seems to need to initialise the debugger server side then the client side works ok. I had noted in another project that the only components that did not work e.g. breaking on breakpoints were ones that injected the http client, any blazor components without api/http client calls seemed to break on break points ok. |
Yes, this is with a brand new project too. |
I get the same thing -- deleting the .vs folder within the solution and restarting Visual Studio 2019 seems to fix it ...eventually. Based on the logs, when this happens the debugger is usually trying to attach to a port that I never specified (even in other recent solutions). System.TimeoutException: Failed to start the debug proxy within the timeout period of 10 seconds. |
Just upgraded to VS 16.10.1 and I'm still getting this error frequently when launching a debug session. It happens on both Core (Blazor WebAssembly) projects and older Asp.Net Framework (4.x) projects. I've tried all the usual -- delete .vs folder, delete bin/obj folders, etc. There seems to be no pattern to it in my case. |
Hi folks. If you hit this "Microsoft Visual Studio Failed to launch debug adapter" due to a ProtocolException when trying to debug a Blazor WebAssembly app, please be sure the use the Visual Studio Send Feedback -> Report a Problem feature to let us know. This will automatically collect the logs that we need to understand why the the debug proxy failed to launch. Thanks for your patience on this one! |
Since this issue isn't actionable on our side without the corresponding VS logs, I'm going to close this issue and we'll follow up on the various Visual Studio Feedback issues. Hopefully we'll get these issues sorted soon. |
This error happened many times to me recently and there is no such a button to send the feedback in the error dialog. |
I having the same problem |
Submitted using Feedback, All requested files and then some. I cannot recommend Blazor to my employer at this time. I will not recommend a product that cannot be debugged. |
I read through the whole postings to figure out what is going on here. Workarround (just to go on working :) ) : Shame... this issue is up over a year now... Also in current version of VS + new Project |
@MS-Hayden - do you use fiddler or similar tool for inspecting local network traffic? I beleive I found in the past if you don't stop fiddler properly it can leave that tickbox checked. |
Yes I do use Fiddler 4, it seems likely this is the cause... |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I am trying to upgrade my .net core 3.1 based solution to .net 5.0.
I am seeing this error with:
Attempting to launch my asp.net core project with visual studio debugger fails:
Looking in output window I got a path to the verbose output log, and here is the relevent info:
Here is the relevent section from my
launchProfiles.json
:Note: if I change
launchBrowser
tofalse
I can successfully start the project, and then open the browser and navigate to the url manually.Other Note:
Edge is my default browser. When this error occurs, it seems a new empty Edge window is created:
To Reproduce
As per above that's the best I can do at present.
Exceptions (if any)
See screenshots and logs above.
Further technical details
dotnet --info
The text was updated successfully, but these errors were encountered: