在Visual Studio 2015中附加调试器不适用于Azure网站 [英] Attach debugger not working for Azure Websites in visual studio 2015

查看:99
本文介绍了在Visual Studio 2015中附加调试器不适用于Azure网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

附加调试器不适用于Visual Studio 2015中的Azure网站

Attach debugger not working for Azure Websites in visual studio 2015

我遇到了以下错误

请帮助

无法配置远程调试器.

Unable to configure remote debugger.

无法加载属性

无法加载应用设置

推荐答案

我为这个问题努力了大约3个小时.解决方案是通过Visual Studio的附加到进程"来手动附加调试器.

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

这是步骤.

1)让我们进入Azure门户@ https://portal.azure.com ,然后转到您的App Services目录(以如图所示).

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)单击要调试的应用程序.

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

3)单击设置"或所有设置"(两者都会启动所有设置"刀片)

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

4)转到应用程序设置",然后向下滚动.在那里,您将看到远程调试".如图所示,检查是否已打开非常重要.选择适当的Visual Studio版本.请注意,如果您是从经典门户网站访问的,则将不能选择Visual Studio 2015.

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.

5)按保存.

如果您从未为App Service设置FTP帐户,请继续阅读,否则请跳至步骤8.

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

6)在已经打开的所有设置"(All Settings)刀片中,向下滚动并查找"Deployment certificate".在这里,您将创建一个FTP用户名和密码.放任何你想要的.当然,我建议您使用与帐户不同的用户名,并为其使用强密码.

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.

7)单击保存.

8)如果您忘记了FTP用户名,则在Web应用程序的主页(单击所有设置")中,您将拥有部署用户名.在此示例中,将使用斜杠后的斜杠.如果是mywebsite \ userftp,则将使用 userftp .

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.

9)让我们进入Visual Studio.打开要调试的项目,然后选择调试"选项卡.

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

10)单击附加过程".当然,您可以按Alt + P,这也会为您打开窗口!

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

11)现在,您将专注于预选赛.将您的azurewebsites.net域放在那里.您可以尝试使用.com网域,但在我的情况下却无法正常工作.我正在使用 Cloudflare 在共享的Azure网站上启用https,似乎正在过滤与调试器的连接.

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)按键盘上的Enter键或单击刷新"按钮.

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

13)将出现以下提示:

13) The following prompt will appear:

14)如图所示:用户名将是:theSameWebsiteYouPutInTheQualifier.azurewebsites.net **.** exampleftp

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

请注意以下几点:

a)您必须在限定符中输入相同的网站URL.

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

b)您必须在.net或.com后面加上点号和反斜杠

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

c)您必须输入FTP用户名.请记住,在阅读第8点之后,如果丢失了这一点,则必须在Azure网站上进行检查,并在反斜杠后使用该名称.

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)选择w3wp.exe,然后按附加"

15) Select w3wp.exe and press "Attach"

16)这将为您带来橙色的糖果色就绪"栏:D

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

这篇关于在Visual Studio 2015中附加调试器不适用于Azure网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆