microsoft / vscode-azurefunctions

Azure Functions extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions
MIT License
298 stars 138 forks source link

[Unstable] Improve Azure Functions Core Tools detection #4436

Open MicroFish91 opened 1 month ago

MicroFish91 commented 1 month ago

Scenario

Not sure why, but I recently started getting this issue that I wasn't seeing before.

If I go to debug and Core Tools isn't detected, I'm greeted with this when I hit F5:

Image

If I follow the instructions to install and then press F5 again, I see the same popup. I can verify that Functions Core Tools is installed via func --version:

Image

At this point, to fix it I need to go to the user setting to set my Core Tools path:

Image

Suggestion

There's two improvements that could be nice here.

1) At the very least indicate to me that the user setting may need to be set to get Core Tools to be detected properly

2) Even better, it would be nice to try and detect this for the user and set the setting for them. For example, I was able to run which func to get the path and set the setting. It would be a lot more slick to do stuff like this for the user and not have them fiddle around with figuring out that they need to do this themselves

MicroFish91 commented 1 month ago

Edit: Investigating some more and after restarting VS Code this no longer reproduces. Really strange why this was happening the first time. Of note - when I ran into this issue the first time, I should have already had core tools installed before even starting VS Code.