0

I am trying to follow this tutorial to run azure function app using C# using vscode. But when I click the run button, it shows "You must have the Azure Functions Core Tools installed to debug your local functions." But I have actually installed it in my mac. When I click the install button, it shows errors like follows: /bin/bash: func: command not foundThe terminal process "/bin/bash '-c', 'func host start'" failed to launch (exit code: 127).

And on the right bottom there is a small window showing:

Error exists after running preLaunchTask "host start". View task output for more information.

But when I use the command func host start in my local terminal, it can run smoothly.

PredragDj
  • 313
  • 1
  • 3
  • 10
superDu
  • 67
  • 9

1 Answers1

0

We have tried the same but on Windows(OS) , Below are the workaround to resolve the above issue.

  • Created a new Azure function with HTTP Trigger using .net 6 enter image description here

  • Before debugging we have started the Azure storage Emulator/Azurite on local.

enter image description here

Or Alternatively, We can add "AzureWebJobsStorage": "UseDevelopmentStorage=true", in our localsettings.json and tried to debug by using .net Function.

enter image description here

OUTPUT DETAILS FOR REFERENCE:-

enter image description here

NOTE:- To run function locally based on the given MICROSOFT DOCUMENTATION:-

Click on Ctrl - (macOS) the HttpExample function and choose Execute Function Now enter image description here

Or, we can add a breakpoint over our function.cs file and type start debug as shown below :-

enter image description here

For more information regarding VS CODE on macos configuration Please refer this SO THREAD discussions .

AjayKumarGhose
  • 4,257
  • 2
  • 4
  • 15