Improve task debugging by giving more context
See original GitHub issueMost of this text comes from an email. The context is that I got on a phone call with a customer who was experiencing issues debugging an Azure Function App.
The issue
F5 debugging of a Function App would show:
> Executing task: func host start <
And then something saying that the last exit code was 1.
It wasn’t clear what the problem was, why it was failing, and we found that this would fail on func extensions install
and func host install
… running the func commands in the PowerShell Integrated Console or outside of VS Code in any terminal worked just fine…
The resolution
Then we realized that the customer’s default shell……… was WSL.
As you know, tasks use the default shell to run in by default. Which means that the func
commands were being run in WSL which didn’t have the Core Tools installed in it so the Task threw an exit code of 1 because the command wasn’t found.
Once Aleksandar changed his default shell back to PowerShell, everything started working again.
The problem
The lack of warning on tasks as to what went wrong is very hard to debug… see above. It took an hour and a half to make this realization… And even more of the customer’s time to get to the point where they asked to get on a call…
The ask
Show the shell being used to run tasks or give more than just an exit code if possible. We need more context as what’s actually going on when a task is being run.
I think this is a generic problem with any extension that relies on tasks and not just the Azure Functions extension.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:28
- Comments:7 (4 by maintainers)
Top GitHub Comments
Pls no
Might have been a WSL specific thing 🤔