visual studio 2017远程调试azure api应用程序:“当前不会命中断点。没有为该文档加载任何符号。 [英] visual studio 2017 remote debugging azure api app: "The breakpoint will not currently be hit. No symbols have been loaded for this document."

查看:511
本文介绍了visual studio 2017远程调试azure api应用程序:“当前不会命中断点。没有为该文档加载任何符号。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试远程调试在Azure上运行的asp.net core 1.1 api应用程序(目标是.net Framework 4.5.2)。

我通过服务器资源管理器连接调试器。调试器将附加到正确的过程。但是我设置的任何断点都有消息该断点当前不会被命中。该文档尚未加载任何符号。

我见过的所有此类问题的答案都假定模块窗口显示项目加载的所有模块,但在我的情况下,模块窗口为空!

我在VS2017 15.4上。

如果我没记错的话,我以前可以进行远程调试与版本15.2相同的项目。当我更新到15.3时就开始出现问题,但当时我没有继续尝试。

I'm trying to remote debug an asp.net core 1.1 api app (targeting .net framework 4.5.2) that's running on Azure.
I attach the debugger via Server Explorer. The debugger attaches to the correct process. But any breakpoint I set has the message "The breakpoint will not currently be hit. No symbols have been loaded for this document."
All answers I've seen to such a problem assume that the modules window shows all modules loaded by my project, but in my case the modules window is empty!
I'm on VS2017 15.4.
If I remember correctly, I was previously able to remote debug the same project with version 15.2. The problem started occurring when I updated to 15.3 but I didn't pursue it at the time.

推荐答案

我在MS论坛上提交了问题:无法远程调试Azure API应用

I submitted the problem on the MS forums: Can't remote debug Azure API app

现在我已经收到正式答复,它确实是VS中的错误,并且即将发布的版本(15.6)中将提供修复程序。

and now I have received an official reply that it is indeed a bug in VS, and a fix will be available in the pending release (15.6).

还提出了一种解决方法,我尝试过并且确实可行:手动将调试器附加到Azure Web Apps

They also suggested a workaround, which I tried and indeed worked: Manually Attach a Debugger to Azure Web Apps

涉及的内容:


  1. 转到Web应用程序Azure门户中的应用程序设置,并确保启用了远程调试,
  1. Going to the web app Application settings in the Azure portal, and making sure that Remote debugging is enabled,

在 VS菜单中:调试>附加到进程...,使用调试端口输入Web应用程序的URL,例如:

In the VS menu: Debug > Attach to Process..., entering the web app url with the debugging port, e.g.:

myapp.azurewebsites.net:4022  


  • 然后在显示的凭据中输入用户名&该应用程序的发布个人资料中提供的密码,可以从门户网站下载该密码。如果用户名是$ myapp,则应这样输入:

  • Then in the credentials that appears, entering the username & password that are available in the app's Publish Profile, which can be downloaded from the portal. If the username is $myapp, it should be entered like this:

    $myappp\$myapp  
    


  • 然后选择Managed(v4.6,v4.5,v4.0)代码,然后选择Core名称应用程序。

  • Then choosing Managed(v4.6, v4.5, v4.0) code and then the name of the Core app.

    实际上,我之前发现并尝试了类似的方法,但均未成功。对我来说,关键是步骤3。其他人建议输入用户名.my $ myapp或myapp\ $ myapp。因此,请确保按上面的文字输入。

    Actually, I had found and unsuccessfully tried similar approaches before. The key for me was step 3. The others had suggested entering the username as .\$myapp, or myapp\$myapp. So make sure to enter it as written above.

    BTW,看到以上博客文章来自大约2年前(2016年2月),而我的问题是体验只是在几个月前才推出的,它似乎可以解决所有问题,因此对于必须处理远程调试Azure应用程序的任何人来说,保存此信息以供将来参考都是值得的。

    BTW, seeing that the above blog post is from almost 2 years ago (Feb 2016), whereas the problem I'm experiencing was introduced only a few months ago, it seems to be a cure-all, and it is therefore worthwhile, for anyone who has to deal with remote debugging Azure apps, to save this information for future reference.

    更新:
    将VS 2017更新到15.5.2版后,问题似乎已解决。

    UPDATE: After updating VS 2017 to version 15.5.2 the problem seems to have been fixed.

    这篇关于visual studio 2017远程调试azure api应用程序:“当前不会命中断点。没有为该文档加载任何符号。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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