-
Notifications
You must be signed in to change notification settings - Fork 69
Error: no such option: --default #2101
Description
Environment data
- VS Code version: 1.42.1
- Extension version (available under the Extensions sidebar): Python 2020.2.64397
- OS and version: Windows 10 64bit
- Python version (& distribution if applicable, e.g. Anaconda): 2.7.14
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): virtualenv
- Relevant/affected Python packages and their versions: XXX
- Relevant/affected Python-related VS Code extensions and their versions: Flask 1.1.1
- Jedi or Language Server? (i.e. what is
"python.jediEnabled"set to; more info How to update the language server to the latest stable version vscode-python#3977): XXX - Value of the
python.languageServersetting: XXX
Expected behaviour
It should start to debug my project
Actual behaviour
I receive this error:
C:\Users\s3rgy0\envs\venv\Scripts\python.exe c:\Users\s3rgy0.vscode\extensions\ms-python.python-2020.2.64397\pythonFiles\ptvsd_launcher.py --default --client --host localhost --port 51765 -m flask run --no-debugger --no-reload --host=192.168.0.163 --port=3002
Usage: python -m flask [OPTIONS] COMMAND [ARGS]...
Try "python -m flask --help" for help.
Error: no such option: --default
Steps to reproduce:
- I followed this tutorial https://code.visualstudio.com/docs/python/tutorial-flask step by step but i used virtualenv instead of env because my project is written in python 2.7
- Start debugging
Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
C:\Users\s3rgy0\envs\venv\Scripts\python.exe c:\Users\s3rgy0\.vscode\extensions\ms-python.python-2020.2.64397\pythonFiles\ptvsd_launcher.py --default --client --host localhost --port 51765 -m flask run --no-debugger --no-reload --host=192.168.0.163 --port=3002
Usage: python -m flask [OPTIONS] COMMAND [ARGS]...
Try "python -m flask --help" for help.
Error: no such option: --default
Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)
I've no output because i can't debug
I don't know if this is a bug but i couldn't find any info about this error anywhere. I could debug flask with vscode in os x without problems, but in windows i receive this error. I repeat the tutorial multiple times but the result is always the same. The tutorial is written by python 3 but i changed the "env" to "virtualenv", i don't know if i should make any other change.
i think the problem is with python extension but i didn't be able to find any config file to modify this command:
C:\Users\s3rgy0\envs\venv\Scripts\python.exe c:\Users\s3rgy0.vscode\extensions\ms-python.python-2020.2.64397\pythonFiles\ptvsd_launcher.py --default --client --host localhost --port 51765 -m flask run --no-debugger --no-reload --host=192.168.0.163 --port=3002
If i could remove this options: "--default --client --host localhost --port 51765" it should work, but i don't know how.
Please help.
Thanks.