Home > Enterprise >  I set debug mode on in Flask but it is being showed as "off" in console
I set debug mode on in Flask but it is being showed as "off" in console

Time:09-24

As I express in the above section, I couldn't set debug mode even I type "app.run(debug=True)" in PyCharm.Take a look at console ,it says "Debug mode : off"

Console photo

CodePudding user response:

Weel , you should click on the wrench button which is in the second row of first vertical column,I attached a photo of it,and enable the flask_debug form on- its photo also was attched -. I even didn't know this part's exixtence and its relation about app , I just found it by chance so I wanted to share it, I hope I helped you a little bit and made things easier.

here wrech button

here flask_debug form to enable it

CodePudding user response:

The environment variable for running in debug mode should be set to 1 (ie True):

>>> FLASK_DEBUG=1

Or, set the development mode explicitly, which also starts the debugger and also enables hot-reloading:

>>> FLASK_ENV=development
  • Related