I have an Azure App Service which hosts my Web Api solution. Sometimes, when there's a production issue which can not be reproduced on local environment, I usually attach a Visual Studio 2019 (community edition) debugger to that live instance.
For some reason, now it has stopped. When I try to attach the debugger by making a reference to Cloud Explorer > Pay As You Go > App Services > my-app-service (right-click and Attach Debugger) I get the following error:
System.Runtime.InteropServices.COMException (0x89710023): Unable to connect to the Microsoft Visual Studio Remote Debugger named '************************.azurewebsites.net'. The connection with the remote endpoint was terminated.
at Microsoft.WebTools.Azure.VS.Operations.IDebuggerInternal120.ConnectToServer(String szServerName, VsDebugRemoteConnectOptions[] pConnectOptions, CONNECT_REASON ConnectReason, Int32 fIncrementUsageCount, IDebugCoreServer3& ppServer)
at Microsoft.WebTools.Azure.VS.Operations.RemoteDiagnosticsSessionBase`1.ConnectToServer(String site, String user, String password)
I have no idea why is that. Tried to logout/login from my Azure account, also tried to restart the app service oh Azure but still nothing. Also tried to re-deploy the app but again nothing.
Tried the below approaches:
Approach 1:
In Visual Studio => View => Cloud Explorer => Select your App Service => Right click and Attach Debugger.
Got the below error.
Approach 2:
In VS => Debug tab => Attach to process. In Connection target enter the deployed URL name without https Ex: YourWebAppName.azurewebsites.net
Error:
Approach 3:
In Publish window => Hosting => Attach Debugger
Refer Configure ports for more information
As mentioned in official MSDoc , if you still face after checking all the approaches, you can report the issue.
You can follow the GitHub link for further updates.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.