Create your first Azure Function

Test the function locally

Azure Functions Core Tools lets you run Azure Functions project on your local development computer. You are prompted to install these tools the first time you start a function from Visual Studio.

  1. To test your function, press F5. If prompted, accept the request from Visual Studio to download and install Azure Functions Core (CLI) tools. You may also need to enable a firewall exception so that the tools can handle HTTP requests.

  2. Copy the URL of your function from the Azure Functions runtime output.

    Azure local runtime

  3. Paste the URL for the HTTP request into your browser’s address bar. Append the query string ?name=<yourname> to this URL and execute the request. The following shows the response in the browser to the local GET request returned by the function:

    Function localhost response in the browser

  4. To stop debugging, click the Stop button on the Visual Studio toolbar.

After you have verified that the function runs correctly on your local computer, it’s time to publish the project to Azure.

I ran into an issue The function works