[英]How to debug Web API deployed on Azure App Service?
I have web api deployed on azure. One of the action methods of the web api is failing.我在 azure 上部署了 web api。web api 的一种操作方法失败了。 To reach that specific action method users have to log in first.
要访问特定的操作方法,用户必须先登录。 Is there any official guide available that can help me do the debugging process for web api?
是否有任何官方指南可以帮助我进行 web api 的调试过程? Do I need to deploy both web app and web api in order to attach the debugger to the app service or should I use just postman to make api call?
我是否需要同时部署 web 应用程序和 web api 以便将调试器附加到应用程序服务,或者我应该只使用 postman 进行 api 调用?
To enable debugging on azure app service resources
you have to look into the following steps:要在
azure app service resources
上启用调试,您必须查看以下步骤:
Enable Remote Debugging on Azure App service:在 Azure 应用服务上启用远程调试:
1.SELECT YOUR APP SERVICE WHICH WANT TO DEBUG
2. TO TO GENERAL SETTINGS
3. SCROLL DOWN AND LOCATE DEBUGGING
4. CLICK TO ON
5. SELECT YOUR VISUAL STUDIO VERSION
Open Cloud Explorar Option In Visual Studio:在 Visual Studio 中打开 Cloud Explorar 选项:
Now in visual studio go to View
and click on Cloud Explorer
现在在visual studio go中
View
并点击Cloud Explorer
When you would provide login credential it should load your app service project as below:当您提供登录凭据时,它应该加载您的应用程序服务项目,如下所示:
Note: Your project which you want to debug should be open in visual studio as well.注意:您要调试的项目也应该在 visual studio 中打开。
The above answer is very details on how to attach debugger using w3wp.上面的答案非常详细地介绍了如何使用 w3wp 附加调试器。
I think you should start enabling HTTP logging and eventviewer logs to better understand the cause of failure.我认为您应该开始启用 HTTP 日志记录和事件查看器日志,以更好地了解失败的原因。
Reference: https://azure.github.io/AppService/2020/08/31/AzMon-AppServiceAppLogs.html参考: https://azure.github.io/AppService/2020/08/31/AzMon-AppServiceAppLogs.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.