Remote debugging websites on Azure App Service (Web App)

Sometimes you need to debug your application in cloud environment (well, I don’t like to say production environment !) to reproduce a bug or test your application against cloud environment data. Azure Web App remote debugging is painless and sweat. The only thing you need is just to attach debugger to your  application. To attach debugger, right click on the Web App name and choose Attach debugger from context menu or actions bar:

Attach debugger to Azure Web App
Choose Attach Debugger from context menu or actions bar

Things to remember:

  • When you attach debugger and pause for breakpoint, you stop all requests to your application. Therefore, you should not debug your application in Production environment. Staging environment is one of the best remote debugger friends although.
  • If debugging takes time and app is stopped for a few minutes, Azure treats your website worker process as unresponsive and will try to restart it; Therefore, you need to be quick.