I have two .NET Core 5.0 Razor Page Model projects, almost identical, reside in the same solution. Have not been running for almost 4 months.
Now when I wish to make some changes. One of the project cannot run in debug mode. I am always getting the following error
{"tag":"dap.receive","timestamp":1625537078095,"metadata":{"connectionId":0,"message":{"type":"request","command":"launch","arguments":{"WebRoot":"xxxx\ApmtWeb\wwwroot","rootPath":"xxxx\ApmtWeb\wwwroot","__workspaceFolder":"xxxx\ApmtWeb\wwwroot","runtimeExecutable":"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe","runtimeArgs":[],"sourceMaps":true,"url":"","trace":{"logFile":"yyyy\Temp\visualstudio-js-debugger.txt"},"port":54798,"launchUnelevated":false,"projectGuid":"cca052fc-e9e7-44d5-8299-28928d665223","userDataDir":"yyyy\Microsoft\VisualStudio\16.0_e9805624\WebTools\F17440DA_BBDA0153","breakOnLoad":true,"smartStep":true,"skipFiles":[],"showAsyncStacks":true,"timeout":10000,"cleanUp":"onlyTab","name":"Visual Studio launch configuration override","type":"pwa-msedge","request":"launch","continueOnDisconnect":true},"seq":2}},"level":0}
The xxxx and yyyy were obscured due to privacy
My launch settings
"ApmtWeb": { "commandName": "Project", "dotnetRunMessages": "true", "launchBrowser": true, "applicationUrl": "", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } }
I am able to see my web page if I manually type in the URL , before the above error shows and forcing it to shutdown.
There is not such setting inside my entire solution as , and I can't find any reference to 54798 even if I do a global search.
43 Answers
When I learned from one of the comments that this is a VS bug, I immediately tried the following:
- Close solution
- Remove all .vs directories from your project
- Launch solution again
Worked for me. Saved me from actually reinstalling VS ;-)
3You can also disable the debugging of JS by VS, vis the Options menu so you just debug in Chrome (F12). Unchecking this feature, press F5, then stop it, the check it again also fixes the problem.
It is not necessary to delete the whole .vs folder, just go to .vs/project/ and delete the debuggerConfiguration -... json file. It is important to close any browser windows that have remained open before running the project again, otherwise it will recreate the debuggerConfiguration -... json file but it still gives an error.
1
