I am trying to locally debug a Azure Function App (Python) using VS Code in WSL, Ubuntu 22.04. Unfortunately though, debugging doesn't seem to work.
I have installed and following pre-requisites -
- Azure extension (and logged in)
- Azure Functions extension (and created a Function App project using Ctl, Shift + p -> Azure Functions: Create New Project...)
- Installed
azurite(and started using Ctl, Shift + p -> Azurite: Start) - Ensure local.settings.json is configured with
"AzureWebJobsStorage": "UseDevelopmentStorage=true"
But when I try to debug using the launch configuration Attach to Python Functions from .vscode/launch.json (added when I created a Function App project), an error message is displayed.
Using Ctl, Shift + p and searching for 'func' does support that the task is missing.
However, on the CLI I can confirm that Azure Function App Tools is installed.
user@computer:~$ func --version
4.0.5198
I don't have the Python extension installed for two reasons -
- It's already installed at the version I require through WSL.
- Installing it makes the debugger not work - it just freezes and 'Python extension loading...' is displayed in the tool bar forever. Nothing is displayed in the 'Python' output. I have attempted the fix as described in this question, but it does not work.
How can I get a Function App to reliably debug using VS Code?
