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
| Tool | Purpose | Download Link |
|---|---|---|
| Azure Subscription | Cloud account to deploy and run functions | portal.azure.com |
| Visual Studio Code | Code editor with Azure extensions | code.visualstudio.com |
| Azure Functions Core Tools | Run and test functions locally on the machine | via npm or direct installer |
| Node.js (v18 or later) | Runtime required by Core Tools and JS functions | nodejs.org |
| .NET SDK (optional) | Required only for C# functions | dot.net |
| Azure CLI (optional) | Deploy and manage functions from the terminal | learn.microsoft.com/cli |
| Azurite (Storage Emulator) | Simulates Azure Storage on the local machine | npm 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
| Issue | Cause | Fix |
|---|---|---|
func command not found | Core Tools not in PATH | Restart terminal or re-run npm install |
| Port 7071 already in use | Another process using the port | Run func start --port 7072 |
| Storage connection error | Azurite not running | Start Azurite from VS Code or terminal |
| Azure login fails in CLI | Expired token | Run 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.
