azure-functions-python-worker: Unable to test Azure Function in Python locally
I have an Azure Function written in Python which was working fine with Visual Studio Code. I was able to run it locally, test and even deploy to Azure. I checked it on the portal and the function is running fine for quite some time now.But after updating the Azure Function core tools version to 3, I’m getting this message when I run it locally
Invalid Message: "noDebug" is not supported for attach
and gave me the options to “Open launch.json” or “Cancel”.
I did check my launch.json file and I didn’t make any changes, here is the content of the file
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Python Functions",
"type": "python",
"request": "attach",
"port": 9091,
"preLaunchTask": "func: host start"
}
]
}
EDIT: I downgraded Azure Function core tools to 2.0 and the issue still exists. Is it something related to VS Code?
I did try creating a fresh Azure Function project using VS Code and copied all the functions to the new project and it worked. But the old project still has the issue.
If someone wants to still take a shot at it, I’ll be more than happy to provide any information
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 28 (6 by maintainers)
This may be an edge case, but I had the same issue because I swapped the F5 and Ctrl-F5 keys in my vscode preferences. Pressing Ctrl-F5 (Debugging) instead of F5 (Start without debugging) solved the issue.
@vrdmr @YunchuWang
I confirm that Azure Tool Core V4 still got this error as well, quite annoying when I press Ctrl F5 as usual behavior
Hi @JonasBergholz and @paolosalvatori, thanks for raising this issue. Could you check if the function app can be successfully started by the function core tools. Installation:
npm install -g azure-functions-core-tools@3Run with Core Tools:cd <your function app directory>func host start --verboseWe want to distinguish if this is a VSCode bug or a Core Tools bug.
+ @stefanushinardi @vrdmr @Hazhzeng for assistance.