AZ Functions Development Environment Setup

Before writing any Azure Function, the development machine needs a few tools installed. This topic walks through every required tool, explains its purpose, and shows how to verify the installation. All tools listed here are free.

Tools Required

ToolPurposeDownload Link
Azure SubscriptionCloud account to deploy and run functionsportal.azure.com
Visual Studio CodeCode editor with Azure extensionscode.visualstudio.com
Azure Functions Core ToolsRun and test functions locally on the machinevia npm or direct installer
Node.js (v18 or later)Runtime required by Core Tools and JS functionsnodejs.org
.NET SDK (optional)Required only for C# functionsdot.net
Azure CLI (optional)Deploy and manage functions from the terminallearn.microsoft.com/cli
Azurite (Storage Emulator)Simulates Azure Storage on the local machinenpm install -g azurite

Step-by-Step Setup Guide

Step 1 – Create a Free Azure Account

Visit portal.azure.com and sign up for a free account. Microsoft provides a $200 credit for 30 days and a set of always-free services. No real workload is needed during learning — the free tier covers everything in this course.

Step 2 – Install Visual Studio Code

Download and install VS Code from code.visualstudio.com. After installation, open VS Code and install the following two extensions from the Extensions panel (Ctrl+Shift+X):

  • Azure Functions (by Microsoft)
  • Azurite (by Microsoft) – local storage emulator

Step 3 – Install Node.js

Azure Functions Core Tools depends on Node.js. Download the LTS version from nodejs.org. After installation, open a terminal and run:

node --version

The output should show a version number like v18.17.0. This confirms a successful installation.

Step 4 – Install Azure Functions Core Tools

Open a terminal and run the following command:

npm install -g azure-functions-core-tools@4 --unsafe-perm true

After installation, verify with:

func --version

A version number like 4.0.5xxx confirms the installation is complete.

Step 5 – Install Azure CLI (Optional but Recommended)

The Azure CLI allows deploying functions from the terminal instead of the browser. Download the installer from Microsoft's documentation site for Windows, macOS, or Linux. After installation, verify with:

az --version

Local Development Flow – Diagram

┌──────────────────────────────────────────────────────────────┐
│                  LOCAL DEVELOPMENT FLOW                      │
│                                                              │
│  ┌──────────────┐    ┌──────────────┐    ┌───────────────┐  │
│  │  Write Code  │───►│  func start  │───►│ Test Locally  │  │
│  │  (VS Code)   │    │(Core Tools)  │    │(localhost:7071│  │
│  └──────────────┘    └──────────────┘    └───────────────┘  │
│                                                   │          │
│                                                   ▼          │
│                                        ┌──────────────────┐ │
│                                        │ Deploy to Azure  │ │
│                                        │  (az or VS Code) │ │
│                                        └──────────────────┘ │
└──────────────────────────────────────────────────────────────┘

What is Azurite?

Many Azure Functions use Azure Storage (queues, blobs, tables) as triggers or outputs. Azurite is a free tool that pretends to be Azure Storage on the local machine. This means functions with storage dependencies can run and be tested without connecting to the real cloud.

Start Azurite directly from the VS Code bottom status bar after installing the extension, or run it from the terminal:

azurite --silent --location c:\azurite --debug c:\azurite\debug.log

Verifying the Complete Setup

Run the following commands one by one in a terminal. Each should return a version number without errors:

node --version        # Should show v18.x or higher
npm --version         # Should show 9.x or higher
func --version        # Should show 4.x
az --version          # Should show 2.x (if installed)

Common Setup Issues and Fixes

IssueCauseFix
func command not foundCore Tools not in PATHRestart terminal or re-run npm install
Port 7071 already in useAnother process using the portRun func start --port 7072
Storage connection errorAzurite not runningStart Azurite from VS Code or terminal
Azure login fails in CLIExpired tokenRun az login again

Project Folder Structure Overview

When Azure Functions Core Tools creates a new project, it generates a standard folder structure:

my-function-app/
├── host.json              ← Global settings for the function app
├── local.settings.json    ← Local environment variables (never commit this!)
├── .gitignore
└── HelloWorld/
    ├── function.json      ← Trigger and binding config for this function
    └── index.js           ← The actual function code

This structure is the same regardless of which language is chosen. The next topic uses this structure to create the first function.

Leave a Comment