-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flask run does not respect debug config in config files #1979
Comments
And furthermore,
|
@PlasmaSheep thks for your good question... however maybe there has something mistake with your understand about debug mode.
maybe it's pocoo's misatake for not describe it clearly.
in flask-cli.py Line 402 you would see that flask command run simple_run command. |
@luke0922 is right about FLASK_DEBUG. Fair enough about the second example. I'm not sure about whether there exists a good solution though. |
In this case I am not surprised, I wish the documentation was a bit clearer though.
Yes, but the issue is that there seems to be no way to enter debug mode when using a custom management script. The only way to use debug mode is to have an additional file which creates an application from the factory. |
I don't understand where you're getting that. You can set |
possible duplicate of #1641 |
It's hard to go the other direction because the app may be lazy loaded, so you can't determine its debug state until it's actually loaded, which doesn't happen until after the server is started. |
This doesn't have the same functionality as
Actually yes, this did not turn up in my searches. I'll close this, sorry about that. |
To reproduce:
https://github.com/PlasmaSheep/flask-bug
Clone repo and install flask (python2)
Notice the output:
So debug is enabled in the config, but the debugger is not actually active.
This does work if you set the
FLASK_DEBUG
env variable:However I think that the debug parameter should be specified in only one place, and that place should be the application config file so that you don't have to worry about setting environment variables for things you already specified in the config.
The text was updated successfully, but these errors were encountered: