You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This basically breaks debugging (on windows with python 2.7), where the debugger re-writes sys.argv before click or flask is loaded. So, attempting to debug flask using ptvsd or pydevd results in the error message below.
Expected
>python -m ptvsd --host localhost --port 5692 -m flask run --no-debugger --no-reload --with-threads --port 5014
* Serving Flask app "app"
* Environment: development
* Debug mode: on
* Running on http://127.0.0.1:5014/ (Press CTRL+C to quit)
Actual
>python -m ptvsd --host localhost --port 5692 -m flask run --no-debugger --no-reload --with-threads --port 5014
Usage: python -m flask [OPTIONS] COMMAND [ARGS]...
Try "python -m flask --help" for help.
Error: no such option: --host
Environment
Python version: 2.7
Flask version: 1.1.1
Werkzeug version: N/A
Platform: Windows
The text was updated successfully, but these errors were encountered:
Previously flask (v1.0.3) was passing
sys.argv
tocli.main
:https://github.com/pallets/flask/blob/1.0.3/flask/cli.py#L889-L906
Now flask (v1.1.1) is not passing
argv
, tocli.main
.https://github.com/pallets/flask/blob/1.1.1/src/flask/cli.py#L965-L966
This causes it to always get args via
get_os_args
viaclick
.https://github.com/pallets/click/blob/7.0/click/core.py#L700-L704
Which is this issue in click pallets/click#536
This basically breaks debugging (on windows with python 2.7), where the debugger re-writes
sys.argv
beforeclick
orflask
is loaded. So, attempting to debug flask usingptvsd
orpydevd
results in the error message below.Expected
Actual
Environment
The text was updated successfully, but these errors were encountered: