author | ms.service | ms.topic | ms.date | ms.custom | ms.author |
---|---|---|---|---|---|
ggailey777 |
azure-functions |
include |
06/15/2022 |
devdivchpfy22 |
glenga |
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. If you don't already have Core Tools installed locally, you are prompted to install it the first time you run your project.
-
To call your function, press F5 to start the function app project. The Terminal panel displays the output from Core Tools. Your app starts in the Terminal panel. You can see the URL endpoint of your HTTP-triggered function running locally.
:::image type="content" source="./media/functions-run-function-test-local-vs-code/functions-vscode-f5.png" alt-text="Screenshot of the Local function Visual Studio Code output.":::
If you don't already have Core Tools installed, select Install to install Core Tools when prompted to do so.
If you have trouble running on Windows, make sure that the default terminal for Visual Studio Code isn't set to WSL Bash. -
With the 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="Screenshot of execute function now from Visual Studio Code.":::
-
In the Enter request body, press Enter to send a request message to your function.
-
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 the Terminal panel.
-
Press Ctrl + C to stop Core Tools and disconnect the debugger.