Asad Nawaz
Asad Nawaz

Reputation: 395

Azure Toolkit Error Failed to Execute run configuration

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?

Upvotes: 4

Views: 4248

Answers (2)

Alferd Nobel
Alferd Nobel

Reputation: 3979

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.

Upvotes: 0

stdunbar
stdunbar

Reputation: 17535

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.

Upvotes: 1

Related Questions