How To Remote Debugging in Azure for Visual Studio

How To: Remote Debugging in Azure for Visual Studio 2015

Posted By
BDO

I recently deployed an Adxstudio portal to Azure, and needed to debug it remotely. This article will not cover how to initially deploy a portal or website to Microsoft Azure App Service, but will walk you through how to set up remote debugging in Azure for Visual Studio 2015. The sample website I deployed to Azure for this article is just a simple ASP.NET forms website, but the steps are the same for an Adxstudio portal.

It is important to note that you should not debug on a production instance, because while you are debugging, your website will appear to be down to other users.

How to Remotely Debug an ASP.NET Website on Microsoft Azure App Service from Visual Studio 2015

  1. I already published my sample website to Azure, but I need to update it so I can debug it. In Visual Studio 2015, in the Solution Explorer, right click on the website project and select Publish.How To Remote Debugging in Azure for Visual Studio 2015 1
  2. In the Settings tab, change Configuration to Debug and click Publish.How To Remote Debugging in Azure for Visual Studio 2015 2
  3. Once you have published your website to Azure for debugging, log into the Azure portal at https://portal.azure.com/. On the left, click on App Services, then select your application.How To Remote Debugging in Azure for Visual Studio 2015 3
  4. In the Settings pane, select Deployment credentials.How To Remote Debugging in Azure for Visual Studio 2015 4
  5. In the Set deployment credentials pane, add a password to set your login credentials for remote debugging and save your changes.How To Remote Debugging in Azure for Visual Studio 2015 5
  6. In the Settings area, select Application settings.How To Remote Debugging in Azure for Visual Studio 2015 6
  7. In the Application settings pane, scroll down to Debugging. Set Remote Debugging to On, and Remote Visual Studio version to 2015 and save your changes.How To Remote Debugging in Azure for Visual Studio 2015 7
  8. In Visual Studio 2015, click Debug and select Attach to Process.How To Remote Debugging in Azure for Visual Studio 2015 8
  9. In the Qualifier box, type the URL of your website (don’t include the “http://www.” prefix) and hit enter. When it asks for you to enter your credentials, enter the deployment credentials you set up in Azure, being sure to use the full FTP/Deployment username. You can find this information in Azure where you view your URL, Resource Group, the Status of the app, etc.How To Remote Debugging in Azure for Visual Studio 2015 9
  10. Select the w3wp.exe process and click Attach. If you get an error at this point, try running Visual Studio as an administrator.How To Remote Debugging in Azure for Visual Studio 2015 10
  11. Now if you go to your website in your browser, and have any breakpoints set in your code, they should be hit and you can step through the code.How To Remote Debugging in Azure for Visual Studio 2015 11

 

Hybrid Clouds the Best of Both Worlds
Find out why Hybrid Clouds could be the solution your business has been looking for!

 

 

BDO eBook - The Cloud Changes the Game

There are times in the course of your business when you have the opportunity to dramatically accelerate growth and improve day-to-day efficiencies. Recognizing

Download