如何远程调试与Azure App Service中的Web应用程序一起部署的按需Web作业? [英] How do I remote debug an on demand web job deployed with a web app in azure app service?

查看:125
本文介绍了如何远程调试与Azure App Service中的Web应用程序一起部署的按需Web作业?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据此解决方案

按需Web作业(也称为已触发")仅在调用它们时运行(无论是手动还是在计时器上).因此,没有正在运行的进程要附加到调用外部.而且,当调用开始时,该过程可能不会持续很长时间.

如果您真的需要在Azure上对其进行调试,则可能的解决方法是在启动时添加一个睡眠,这将使您有足够的时间在开始进行实际工作之前进行附加.但这肯定是古怪的.

您还应该尝试在本地调试它,除非您的问题仅在Azure上发生.

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.

解决方案

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.

这篇关于如何远程调试与Azure App Service中的Web应用程序一起部署的按需Web作业?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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