Latest python extension for VSCode is failing on azure function debugging
See original GitHub issue[11/20/19 4:52:56 PM] Starting worker process:python /Users/user/.vscode/extensions/ms-python.python-2019.11.49689/pythonFiles/lib/python/new_ptvsd/no_wheels/ptvsd --default --host 127.0.0.1 --port 9091 --wait "/usr/local/Cellar/azure-functions-core-tools/2.7.1846/workers/python/3.7/OSX/X64/worker.py" --host 127.0.0.1 --port 50537 --workerId 07b64633-c116-433b-bb4c-b5209f85cec1 --requestId f0f35b48-8733-476c-bb66-4eeb0ef34b33 --grpcMaxMessageLength 134217728
[11/20/19 4:52:56 PM] python process with Id=15422 started
[11/20/19 4:52:56 PM] ptvsd 5.0.0a7
[11/20/19 4:52:56 PM] See https://aka.ms/ptvsd for documentation.
[11/20/19 4:52:56 PM] Usage: ptvsd [--client] --host <address> [--port <port>]
[11/20/19 4:52:56 PM] [--wait]
[11/20/19 4:52:56 PM] [--no-subprocesses]
[11/20/19 4:52:56 PM] [--log-dir <path>] [--log-stderr]
[11/20/19 4:52:56 PM] <filename> | -m <module> | -c <code> | --pid <pid>
[11/20/19 4:52:56 PM] Error: unrecognized switch --default
Environment data
- VS Code version: 1.40.1
- Extension version (available under the Extensions sidebar): 2019.11.49689
- OS and version: Mac OS X, 10.14.6
- Python version (& distribution if applicable, e.g. Anaconda): 3.7.5
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): venv
- Relevant/affected Python packages and their versions: azure functions
- Jedi or Language Server? (i.e. what is
"python.jediEnabled"
set to; more info #3977): XXX
launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Python Functions",
"type": "python",
"request": "attach",
"port": 9091,
"preLaunchTask": "func: host start"
}
]
}
Expected behaviour
Should be able to debug azure functions from VS Code local
Actual behaviour
Failing the debug with above error.
Steps to reproduce:
- Create Azure function with Azure function extension
Logs
python process with Id=15426 started
[11/20/19 4:52:56 PM] ptvsd 5.0.0a7
[11/20/19 4:52:56 PM] See https://aka.ms/ptvsd for documentation.
[11/20/19 4:52:56 PM] Usage: ptvsd [--client] --host <address> [--port <port>]
[11/20/19 4:52:56 PM] [--wait]
[11/20/19 4:52:56 PM] [--no-subprocesses]
[11/20/19 4:52:56 PM] [--log-dir <path>] [--log-stderr]
[11/20/19 4:52:56 PM] <filename> | -m <module> | -c <code> | --pid <pid>
[11/20/19 4:52:56 PM] Error: unrecognized switch --default
[11/20/19 4:52:56 PM] Exceeded language worker restart retry count for runtime:python. Shutting down Functions Host
[11/20/19 4:52:56 PM] Stopping host...
[11/20/19 4:52:56 PM] Stopping JobHost
[11/20/19 4:52:56 PM] Job host stopped
[11/20/19 4:52:56 PM] Host shutdown completed.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Cannot launch debugger for azure function app in vs code
Cannot launch debugger for azure function app in VScode- ECONNREFUSED 127.0.0.1:9091. This type of generic error may occur for a variety of ...
Read more >Troubleshoot Python errors in Azure Functions - Microsoft Learn
Make sure that the latest version of the Azure Functions extension for Visual Studio Code is installed. Verify that the .vscode/settings.json ...
Read more >Python in Visual Studio Code
This article provides only an overview of the different capabilities of the Python extension for VS Code. For a walkthrough of editing, running,...
Read more >Settings Reference for Python - Visual Studio Code
Python settings reference. The Python Extension for Visual Studio Code is highly configurable. This page describes the key settings you can work with....
Read more >Visual Studio Code Frequently Asked Questions
Opt out of extension updates. By default, VS Code will also auto-update extensions as new versions become available. If you do not want...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
✅ Validated, debugging of locally deployed Azure Functions works in 2019.12.51221-dev when in the following experiments:
@svangeti , @EParisot and @Armcollector the fix is available in our latest Insiders build, otherwise it will be deployed in the next release of the Python extension.
I also have the same problem. I am on: 2019.11.50794