How to debug an Azure App Service with Visual Studio 2022


Published on

September 2, 2022

Sometimes (for me very often 🤣) when you deploy an app to Azure doesn't functioning properly. It happens. The app still works on your machine and it's difficult to understand the reason behind.

works on my machine

With Visual Studio you can easily attach the debugger to the App Service process and debug the "remote" application as it's running locally.

From the main menu, click on Debug -> Attach to process. From the new window, select Microsoft Azure App Services as Connection type.

Microsoft Azure App Services

Click on the Find... button and in the new dialog, browse in your Azure subscriptions and select the right app service.

select the app service

At this point, Visual Studio, starts to load assembly from the remote service and you should see the next screen.

loading remote service

After a while, you should see the list on the processes on the remote service and the w3wp.exe process should appear in the list.

w3wp.exe process

Select the process and then click to the Attach button on the bottom right of the window.

Enjoy your debugging session on the App Service 🙂

React, comment and follow on