Skip to content

Files

Latest commit

 

History

History
27 lines (17 loc) · 1.6 KB

functions-run-function-test-local-vs-code-csharp.md

File metadata and controls

27 lines (17 loc) · 1.6 KB
author ms.service ms.topic ms.date ms.author
ggailey777
azure-functions
include
08/16/2021
glenga

Run the function locally

Visual Studio Code integrates with Azure Functions Core tools to let you run this project on your local development computer before you publish to Azure.

  1. To call your function, press F5 to start the function app project. Output from Core Tools is displayed in the Terminal panel. Your app starts in the Terminal panel. You can see the URL endpoint of your HTTP-triggered function running locally.

    Local function VS Code output

    If you have trouble running on Windows, make sure that the default terminal for Visual Studio Code isn't set to WSL Bash.

  2. With Core Tools running, go to the Azure: Functions area. Under Functions, expand Local Project > Functions. Right-click (Windows) or Ctrl - click (macOS) the HttpExample function and choose Execute Function Now....

    :::image type="content" source="media/functions-run-function-test-local-vs-code/execute-function-now.png" alt-text="Execute function now from Visual Studio Code":::

  3. In Enter request body, press Enter to send a request message to your function.

  4. When the function executes locally and returns a response, a notification is raised in Visual Studio Code. Information about the function execution is shown in Terminal panel.

  5. Press Ctrl + C to stop Core Tools and disconnect the debugger.