简体   繁体   English

如何调试部署在Azure App Service上的Web API?

[英]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.

相关问题 我如何远程调试部署在 azure 应用程序服务上的 asp.net 核心 web 应用程序 - How can i remotely debug an asp.net core web app deployed on an azure app service 如何调度 Http Post Service 部署在 Azure App Service Web App from Z3A580F142203677F1F30BCF - How to Schedule Http Post Service deployed on Azure App Service Web App from Azure 部署后,Azure Web Jobs和Azure App Service API是否从相同的“应用程序设置”中读取? - Does Azure Web Jobs and Azure App Service API read from the same “Application Settings” once deployed? 为启用身份验证的Azure Web应用程序服务中部署的Web API启用CORS - Enable CORS for web api deployed in authentication enabled azure web app service 节点应用部署在 Azure 应用服务中,没有找到该网址的网页: - node app deployed in azure app service, No webpage was found for the web address: 部署在Azure Web App / Azure API上时缺少CORS标头 - CORS headers missing when deployed on Azure Web App / Azure API 如何在同一个 ZCF04A02E37B774FC3191A48F605C3 应用程序中部署 angular 应用程序和 web API 应用程序? - How to deploy angular app and web API in same azure app service? 将Azure发行版(Web App Service)中的管道版本部署在错误的文件夹中 - Pipeline releases in azure devops (Web App Service) deployed in wrong folder 部署的 Nodejs 服务在 Azure Web 应用程序上不起作用 - Deployed Nodejs service does not work on Azure Web App 如何构建代码以将 2 个 Web 应用部署到同一个 Azure 应用服务 - How to structure code to have 2 web apps deployed to the same Azure App Service
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM