flask调试模式

想要启用调试模式,发现安装目前网上流行的两种方式均无法在Pycharm中打开调试模式。 
1)直接在对象上设置

 

 

 

flask 更新到1.0以后 不支持使用debug =True 来开启调试模式了。 

Prior to Flask 1.0 the FLASK_ENV environment variable was not supported and you needed to enable debug mode by exporting FLASK_DEBUG=1.
This can still be used to control debug mode, but you should prefer setting the development environment as shown above.

解决办法: 

1.

pycharm环境:Edit Configurations,勾上Flask_Debug

 

 

 

 

 2.

linux环境的export Flask_Debug = 1

 

posted @ 2019-11-09 13:24  wqbin  阅读(206)  评论(0编辑  收藏  举报