[英]Unable to attach to Azure App Service from Visual Studio 2019 Community edition
I have an Azure App Service which hosts my Web Api solution.我有一个 Azure 应用服务,它托管我的 Web Api 解决方案。 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.
有时,当出现无法在本地环境中重现的生产问题时,我通常会将 Visual Studio 2019(社区版)调试器附加到该实时实例。
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:
当我尝试通过引用 Cloud Explorer > Pay As You Go > App Services > my-app-service(右键单击并附加调试器)来附加调试器时,我收到以下错误:
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.
尝试从我的 Azure 帐户注销/登录,还尝试重新启动应用程序服务哦 Azure 但仍然没有。 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.在 Visual Studio => View => Cloud Explorer => Select 您的应用服务 => 右键单击并附加调试器。
Got the below error.得到以下错误。
Approach 2:方法二:
In VS => Debug tab => Attach to process.在 VS => 调试选项卡 => 附加到进程。 In Connection target enter the deployed URL name without https Ex:
YourWebAppName.azurewebsites.net
在 Connection target 中输入部署的 URL 名称,不带https例如:
YourWebAppName.azurewebsites.net
Error:错误:
Approach 3:方法3:
In Publish window => Hosting => Attach Debugger在发布 window => 托管 => 附加调试器
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.如官方MSDoc中所述,如果您在检查所有方法后仍然遇到问题,您可以报告问题。
You can follow the GitHub link for further updates.您可以按照GitHub链接进行进一步更新。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.