Debugging your function locally

Using the Visual Studio debugger (or the Visual Studio Code debugger), you can debug your function locally as you do for any other program written in .NET: you can insert breakpoints, run the software step by step, or use the debug console.

The issue, when you debug an Azure Function, is that your function, generally, doesn't live alone: it writes data to Blob storage, reads items from a storage queue, or inserts documents into a Cosmos DB database.

The question is: how can you emulate the binding endpoints?

Of course, if you have an internet connection, you can use Azure resources (for example, Blob storage) directly but your debug experience will not be the best. On the other hand, if you haven't got an internet ...

Get Mastering Azure Serverless Computing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.