Azure Website Remote Debugging with git deploy not working

社会主义新天地 提交于 2019-11-30 00:56:56

Update 2/8/2014

Some fixes were made in WAWS, and it is now possible to make debugging work when using git, by having VS correctly load the server-side PDBs. For it to work, you need to do one of two things (i.e. you don't need to do both). It can work in both VS 2012 and 2013.

  1. Turn off Just My Code debugging: just turn off that setting in the VS debugger settings and try debugging your Azure Web Site.
  2. Build in Debug mode: to do that on the server build, you can go to the Azure Portal and add an ApSetting called SCM_BUILD_ARGS, with value -p:Configuration=Debug (more details here). Then go to the Deployments page and hit the Redeploy button (for the current deployment). Then attach from VS and it should all work!

Original answer

Indeed, this doesn't work today, and we're trying to see how we could make it work. At the root, the problem appears to be the Visual Studio debugger expects to find the PDBs on the client, while in the git case they only exist on the server.

This article discusses changes to how the debugger works between 2010 and the newer versions, and that probably affects things.

More investigation needed, but this is the state of things right now.

I was having this problem with a .Net Core Azure Function project, using the Cloud Explorer right-click functionality to attach. The following github issue speaks to it, but solution didn't solve my problem:

https://github.com/Azure/Azure-Functions/issues/872

I finally stumbled across the answer here:

http://dontcodetired.com/blog/post/Remote-Debugging-Azure-Functions-V2-The-breakpoint-will-not-currently-be-hit-No-symbols-have-been-loaded-for-this-document

It boils down to manually attaching to the process in Azure, rather than relying on the Cloud Explorer right-click functionality.

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