I've setup a logger with Flask but it doesn't print to the Pycharm console, thought it might be because of not being in debug mode. app.debug = True
but FLASK_DEBUG = 0
when I run the application.
app = Flask(__name__)
app.debug = True
I've setup a logger with Flask but it doesn't print to the Pycharm console, thought it might be because of not being in debug mode. app.debug = True
but FLASK_DEBUG = 0
when I run the application.
app = Flask(__name__)
app.debug = True
you can get it done by visiting the flask edit configuration tab..I have attached the screenshots..please follow it..
visit the flask configuration tab by finding this option in your top right corner
Here you can enable disable debug option for your flask app
Make sure you've acquired the environment variable FLASK_DEBUG in your running environment.
on Unix $ export FLASK_DEBUG=1
on Windows set FLASK_DEBUG=1
Also app.run(debug=False, threaded=True)
worked in Python2.6 ... worth a shot.
This also causes your app to restart when changes are detected in the application's source file.
If you are in windows, just use the following code to set flask_debug:
import os
os.environ["FLASK_DEBUG"] = "1"
Try this settings from official guide https://flask.palletsprojects.com/en/2.2.x/cli/#pycharm-integration
or this answer https://stackoverflow.com/a/73427798/17176270