Easy methods to Debug Azure App Companies Utilizing Distant Debugging in Visual Studio

Debugging is among the key options utilized by each developer in any form of improvement platform or language. Nonetheless, to repair some vital points, typically debugging needs to be executed for the applying which is already deployed within the server.

We all know that the method may be connected to an utility to debug, however how will we do that for the applying hosted in Azure? You’ll get a solution right here, with easy steps.

Step 2


Open your challenge in Visual Studio. Set the debug breakpoint at any line of the code you want to debug.


Step 3


Proper-click the answer and select the “Publish” choice, which will provide you with a display screen just like the one proven beneath. Primarily based on the Visual Studio model you’re utilizing, the display screen UI will differ.


Click on the “Import Profile” choice. On the backside, subsequent to cancel, there’s a settings icon. Click on the settings icon to change the mode from Publish to “Create Profile”


How To Debug Azure App Services Using Remote Debugging In Visual Studio


Step 5


Now click on “Create Profile” on the backside. It is going to open a FileDialog to pick the publishing profile which you downloaded in Step 1. It is going to configure the AppService to be out there for publishing from Visual Studio.


Step 6


By default, publishing profiles can be configured to construct and publish in Launch mode. Nonetheless, right here we’re going to debug, so we have to configure the publish profile to construct and publish in Debug mode. To try this, go to the settings part, as proven beneath:

How To Debug Azure App Services Using Remote Debugging In Visual Studio


Step 7


Within the subsequent display screen, select “Settings” from the left menu and within the configuration choice, select “Debug”, then click on save.


How To Debug Azure App Services Using Remote Debugging In Visual Studio


Step 8


Now, click on the Publish button within the Publish Wizard. Your debug construct together with debugger data can be revealed to the Azure App Service.


Step 9


Now time to allow distant debugging. In your Visual Studio, go to View -> Server Explorer. Within the server explorer, configure your Azure account, which is able to record all of your AppServices within the account.


Step 10


Proper-click on the AppService that you just revealed in Step 8 and select “Connect Debugger” as proven beneath. It is going to publish your app once more and convert your Visual Studio in debug mode.


How To Debug Azure App Services Using Remote Debugging In Visual Studio


We’re all executed. In case you have positioned the debug breakpoint within the start-up file itself, you’ll get a debugging hit within the web page load itself. Elsewise, the breakpoint will hit when the particular performance is executed.


As soon as your debugging is completed, you possibly can once more configure the Publish Profile as Launch mode and publish once more, as a result of we can not depart the debug mode to run within the server.


I hope this text lets you debug your Azure App Service. In case you have any questions/points about this text, please let me know within the feedback. 

Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button