VS2015: Remote Debug Azure Site

末鹿安然 提交于 2019-12-12 03:22:13

问题


I cannot get Visual Studio 2015 to attach remotely to my Azure site. Or, rather, it attaches okay, but no breakpoints are ever hit.

I've confirmed I'm publishing a debug build. I tweaked web.config to require that.

I've confirmed remote debugging support for 2015 is activated within the Azure portal.

The site launches fine after the attachment...just no breakpoints.

This is an MVC6 site using rc1.


回答1:


For the sake of other people struggling with this, it turns out VS2015, even with all the latest updates, isn't "aware" of dnx running under Azure. So it attaches to the wrong process on the Azure site.

After doing "Attach Debugger" within Cloud Explorer or Server Explorer, you must go into Debug -> Attach to Process, and do two things:

  • change the qualifier so it points at the remote Azure site
  • manually attach to the dnx.exe process

The first step seems to get "remembered" by VS 2015. The second step most definitely does not; you have to do it every time you do a remote debug attachment.

Also, you need to refresh the site in your browser after doing all of this for the debug cycle to start.

Here's a link that explains this a bit more: https://blogs.msdn.microsoft.com/webdev/2016/03/21/remote-debug-aspnet-core-on-azure/




回答2:


  1. Try downloading cloud explorer here

  2. attach debugger as below

  1. Enable debugging setting in azure portal with visual studio version as below

  2. Attach remote debugger to w3wp as below

5 Make sure Debug must be = true

Make sure you deploy application to azure in debug mode



来源:https://stackoverflow.com/questions/37688071/vs2015-remote-debug-azure-site

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!