Home > Back-end >  How to debug Web API deployed on Azure App Service?
How to debug Web API deployed on Azure App Service?

Time:10-03

I have web api deployed on azure. One of the action methods of the web api is failing. 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? 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?

CodePudding user response:

To enable debugging on azure app service resources you have to look into the following steps:

Enable Remote Debugging on Azure App service:

1.SELECT YOUR APP SERVICE WHICH WANT TO DEBUG

2. TO TO GENERAL SETTINGS

enter image description here

3. SCROLL DOWN AND LOCATE DEBUGGING

4. CLICK TO ON

5. SELECT YOUR VISUAL STUDIO VERSION

enter image description here

Open Cloud Explorar Option In Visual Studio :

Now in visual studio go to View and click on Cloud Explorer

enter image description here

When you would provide login credential it should load your app service project as below:

enter image description here

Note: Your project which you want to debug should be open in visual studio as well.

CodePudding user response:

The above answer is very details on how to attach debugger using w3wp.

I think you should start enabling HTTP logging and eventviewer logs to better understand the cause of failure.

Reference: https://azure.github.io/AppService/2020/08/31/AzMon-AppServiceAppLogs.html

  • Related