Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Attach debugger not working for Azure Websites in visual studio 2015

Attach debugger not working for Azure Websites in visual studio 2015

I am getting Below error

Please help


Microsoft Visual Studio

Unable to configure remote debugger.

Could not load properties

Could not load app settings

Could not load connection strings

OK

like image 832
user1037747 Avatar asked Oct 01 '15 10:10

user1037747


1 Answers

I cringed for this problem for about 3 hours. The solution was to manually attach the debugger through Visual Studio's "Attach to Process".

Here are the steps.

1) Let's enter to Azure's portal @ https://portal.azure.com, and head to your App Services directory (as shown in the image).

2) Click on the App you would like to debug.

enter image description here

3) Click Settings or All Settings (both will launch the "All Settings" blade)

enter image description here

4) Go to Application Settings and scroll down. In there you will see "Remote Debugging". It is very important to check that this is turned on, as the image show. Select your appropriate Visual Studio version. Note, that if you're visiting from the classic portal you will not be able to select Visual Studio 2015.

enter image description here

5) Press Save.

If you have never set up an FTP account for your App Service, continue reading, otherwise jump to step 8.

6) In the already opened "All Settings" blade, scroll down and look for "Deployment credentials". In here you will create an FTP username and password. Put whatever you want. Of course, I recommend you to use a different username than your account and a strong password for it.

enter image description here

7) Click Save.

8) In case you've forgotten about your FTP username, in the main page of your web app (where you clicked "All Settings"), you will have your deployment username. In this example, you will use the one that goes after the slash. If it is mywebsite\userftp you will use userftp.

enter image description here

9) Let's head to Visual Studio. Open the project you want to debug, and select the "DEBUG" tab.

enter image description here

10) Click on "Attach Process". Of course, you can just hit Alt + P and that will also open the window for you!

11) Now you will focus in the Qualifier. Put in there your azurewebsites.net domain. You could try with your .com domain, but in my case it didn't work. I am using Cloudflare to enable https on my shared Azure website and it seems that it is filtering the connection with the debugger.

12) Press Enter on your Keyboard or hit "Refresh" button.

enter image description here

13) The following prompt will appear:

enter image description here

14) As the picture says: The username will be: theSameWebsiteYouPutInTheQualifier.azurewebsites.net**.**exampleftp

Please note the following:

a) You must put the same website URL you put in the qualifier.

b) You must put the dot and the backward slash after the .net or .com

c) You must put your FTP username. Remember after reading point 8, that if you lose this one, you must check on Azure website and use the name after the backward slash.

Press OK. If you receive some errors, check that Remote Debugging is turned on. It has happened to me that it has turned off without noticing.

15) Select w3wp.exe and press "Attach" enter image description here

16) This shall put you with the goody orange "Ready" bar :D

enter image description here

like image 161
Jose A Avatar answered Oct 12 '22 22:10

Jose A