How do I remote debug an on demand web job deployed with a web app in azure app service?

删除回忆录丶 提交于 2019-12-13 00:13:51

问题


According to this msdn link quoting

Remote debugging only works with continuous WebJobs. Scheduled and on-demand WebJobs don't support debugging.

Is there a way to remote debug azure on demand webjob?

I have VS 2017 Community.

I've tried attach to process to my website but as soon as my web job is called from my site. I loose debugging in VS.

Please help.


回答1:


On-demand WebJobs (aka Triggered) only run when they are invoked (whether manually or on timer). So there is no running process to attach to outside of an invocation. And when the invocation starts, the process may not exist long.

One possible workaround if you really need to debug it on Azure would be to add a sleep on start that would give you enough time to attach before it starts doing real work. But that's certainly quirky.

You should also try debugging it locally, unless your issue only happens on Azure.



来源:https://stackoverflow.com/questions/45905311/how-do-i-remote-debug-an-on-demand-web-job-deployed-with-a-web-app-in-azure-app

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