4

I have an azure function that i want to run and test locally in IntelliJ IDEA. I followed all the steps that were listed here: https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-maven-intellij When i try to run the app via IntelliJ, i get this error log

Azure Toolkit Error
            Failed to execute run configuration, as Azure Functions Core Tools not found. Please go to https://aka.ms/azfunc-install to install Azure Functions Core Tools. 
            If you have installed the core tools, please refer https://github.com/microsoft/azure-tools-for-java/wiki/FAQ to get the core tools path and set the value in function run configuration. failed 
            Call Stack: 
            Execute run configuration
            
            Run function app locally
            
            Validate runtime of function(null)
            
            Azure Functions Core Tools not found. Please go to https://aka.ms/azfunc-install to install Azure Functions Core Tools. 
            If you have installed the core tools, please refer https://github.com/microsoft/azure-tools-for-java/wiki/FAQ to get the core tools path and set the value in function run configuration

I've followed the steps in the links given but to no avail. When I use mvn package followed by mvn azure-functions:run the app runs but I need to hit certain debug points through IntelliJ.

I've been stumped with this for a while, any idea what i could be missing?

2 Answers 2

1

You need to install the core tools - it's the last step under "Set up your development environment". Go to the link in the error - https://aka.ms/azfunc-install and install the tools for your environment. Specifically, you want to make sure you have the command "func" after you install.

Sign up to request clarification or add additional context in comments.

Comments

0

On Mac OS , I solved the issue with the following steps:

  1. cd /usr/local/Cellar/azure-functions-core-tools@3/3.0.3477/workers/java. Use the appropriate directory installation version path.(azure-functions-core-tools@3/3.0.3477)
  2. vi worker.config.json , update "defaultExecutablePath", with your absolute java home like so, "defaultExecutablePath":"/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java",
  3. Save the file ( :wq ) and restart IntelliJ , and that solves the issue.

1 Comment

This answer is in the right direction but if you don't have worker.config.json you can also specify the azure-functions-core-tools through Intellij stackoverflow.com/a/74886518/5777189

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.