如何在本地调试 Azure Function QueueTrigger [英] How to debug Azure Function QueueTrigger locally

查看:14
本文介绍了如何在本地调试 Azure Function QueueTrigger的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个将由 azure 存储队列触发的 azure 函数.对于 HTTPTrigger,我们可以在本地调试,但无法找到在本地调试 QueueTrigger 的方法.你们中的任何人都可以告诉我如何使用 QUEUETRIGGER 对我的本地盒子运行功能进行调试.我的本地机器上有一个存储资源管理器,但它写在 azure 云存储帐户上.

I am developing an azure functions which will be triggered by the azure storage queue. For HTTPTrigger we can debug locally , but am not able to find the way to debug QueueTrigger locally . Can anyone of you tell me how can i acheieve debugging on my local box running function with QUEUETRIGGER . I am having a storage explorer on my local box but it writes on azure cloud storage account .

推荐答案

谁能告诉我如何使用 QUEUETRIGGER 对我的本地盒子运行功能进行调试.我的本地机器上有一个存储资源管理器,但它写在 azure 云存储帐户上.

Can anyone of you tell me how can i acheieve debugging on my local box running function with QUEUETRIGGER . I am having a storage explorer on my local box but it writes on azure cloud storage account.

如果您想在本地针对存储队列测试/调试您的 Azure 函数应用,而不使用 Azure 存储帐户,您可以安装 Microsoft Azure 存储模拟器,提供模拟 Azure Blob、队列和表服务以进行开发的本地环境.目的.

If you'd like to test/debug your Azure functions app against the storage queue locally, without using Azure storage account, you can install the Microsoft Azure storage emulator that provides a local environment that emulates the Azure Blob, Queue, and Table services for development. purposes.

由于我的函数部署在 Azure 上,因此来自队列的消息由运行在 AZURE 上的函数完成

As my function was deployed on the Azure, so the message from the queue from getting consummated by the functions running on AZURE

您在 Azure 上的 WebJob 和来自同一存储帐户的本地使用消息,如果您只想触发本地 WebJob 功能,如您所说,您可以禁用您在 Azure 上的 WebJob.此外,正如我所提到的,要在本地测试/调试 Azure WebJob 功能,您可以使用 Microsoft Azure 存储模拟器.

Your WebJob on Azure and local consume message from same storage account, if you want only local WebJob function is triggered, as you said, you can disable your WebJob on Azure. Besides, as I mentioned, for testing/debuging your Azure WebJob functions locally, you can use Microsoft Azure storage emulator.

这篇关于如何在本地调试 Azure Function QueueTrigger的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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