Run functions locally in the IDE

Right-click on the generated project, then choose Run As and Maven build.

In the Edit Configuration dialog, Enter package in the Goals and Name fields, then select Run. This will build and package the function code.

Once the build is complete, create another Run configuration as above, using azure-functions:run as the goal and name. Select Run to run the function in the IDE.

Terminate the runtime in the console window when you're done testing your function. Only one function host can be active and running locally at a time.

Debug the function in Eclipse

In your Run As configuration set up in the previous step, change azure-functions:run to mvn azure-functions:run -DenableDebug and run the updated configuration to start the function app in debug mode.

Select the Run menu and open Debug Configurations. Choose Remote Java Application and create a new one. Give your configuration a name and fill in the settings. The port should be consistent with the debug port opened by function host, which by default is 5005. After setup, click on Debug to start debugging.

Set breakpoints and inspect objects in your function using the IDE. When finished, stop the debugger and the running function host. Only one function host can be active and running locally at a time.

Deploy the function to Azure

The deploy process to Azure Functions uses account credentials from the Azure CLI. Log in with the Azure CLI before continuing using your computer's command prompt.

az login

Deploy your code into a new Function app using the azure-functions:deploy Maven goal in a new Run As configuration.

When the deploy is complete, you see the URL you can use to access your Azure function app: