VS2015: Remote Debug Azure Site

2019-09-04 04:32发布

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.

2条回答
Explosion°爆炸
2楼-- · 2019-09-04 04:51
  1. Try downloading cloud explorer here

  2. attach debugger as below

enter image description here

  1. Enable debugging setting in azure portal with visual studio version as below enter image description here

  2. Attach remote debugger to w3wp as below enter image description here

5 Make sure Debug must be = true

Make sure you deploy application to azure in debug mode

查看更多
老娘就宠你
3楼-- · 2019-09-04 04:58

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/

查看更多
登录 后发表回答