Debugging Azure Functions Locally

If you’re storing configuration keys in Azure Functions, there is this really cool facility called Application Settings where you can create all these keys and access them when your function runs.

HOWEVER, when running your Azure Function locally, these keys do not automatically download and you need to add them into your local.settings.json file for them to be consumed.

After you have done this, next you need to make sure that this file is set to “Copy if newer” because if it isn’t you’ll never get to consume those values.

I ran into the above very innocently by trying to troubleshoot the granddaddy of all problems – why my AzureWebJobsStorage parameter was empty and I was not able to download what I needed from my Azure portal into it.

Amateur Tip: If this value is empty, you are pooched.  I think what happened is I created a new project, not knowing where I was going to create it and hence never had a value added into it.

This value operates much like a connection string and points to the storage that will house your function.

To get it you need to go to your Storage Account and then download the Connection String value, paste that into your AzureWebJobsStorage field and then you will be able to debug your azure function locally.


Post A Reply

%d bloggers like this: