Ever had an issue on an hosted Azure environment that you can’t replicate locally? 😢
Ever wondered if I could debug an Azure App Service in Visual studio? 🤩
Well your in the right place….
These steps will show you how to do it and configure your VS and Azure to debug your cloud hosted App Service.
- Log in to Azure Portal and go to the App Service that you wish to debug. Grab the Publish profile:
2. Go to Configuration > General Settings and set Remote Debugging to
On and the visual studio version to 2022
3. Go to Visual Studio 2022 and add break points on areas of your code you would like to debug.
4. Right click on your Solution in the Solution Explorer and click on publish
5. Click on Publish tab and then click Add a publish profile
6. Click on Import your profile and select the
.publishsettings file that you downloaded earlier
7. If you haven’t previously published your code to your App Service then hit publish
Note: Before publishing you need to publish your code in debug mode:
8. Once deployed attach the debugger
9. Hit your hosted App Service URL in the browser or Postman to trigger your break points. And Booom!
Happy debugging 😎
Looking for a new role?
We are looking for talented full stack developers to join us at Asset Insights. Based in heart of Lichfield we offer flexible and hybrid working to our devs and work with some of the biggest clients in the industry, take a look at our careers page