问题
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 .
回答1:
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.
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.
edit:
As my function was deployed on the Azure, so the message from the queue from getting consummated by the functions running on 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.
来源:https://stackoverflow.com/questions/45878667/how-to-debug-azure-function-queuetrigger-locally