How to enable debug mode in Flask

I've added this code to my Flask application:

app.run(debug=True)

But it does not seem to enable debug mode. When I run my flask app, PyCharm seems to default to use environment variables which I'm not sure how to change. Is there a way to stop using environment variables and return to the programmatic method? Failing that how do I change the environment variables?

3 comments
Comment actions Permalink

Have you tried enabling FLASK_DEBUG checkbox in the run/debug configuration?

You can also set env variables in run/debug configuration dialog.

0
Comment actions Permalink

Ah, thank you. I missed that. I'll give it a try now.

0
Comment actions Permalink

Ok. That fixed the problem. Thank you. I guess when I move into production I turn that option off and change the environment from development to production?

0

Please sign in to leave a comment.