小白求助,flask debug模式问题
flask吧
全部回复
仅看楼主
level 2
FSlucky丶 楼主
为什么不会像网上那样有debugger is activate 的提示???
2018年04月29日 02点04分 1
level 2
FSlucky丶 楼主
1
2018年04月29日 02点04分 2
level 2
FSlucky丶 楼主
2
2018年04月29日 03点04分 3
level 2
FSlucky丶 楼主
3
2018年04月29日 03点04分 4
level 2
FSlucky丶 楼主
4
2018年04月29日 05点04分 5
level 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.
具体怎么使用,还在研究中,如果楼主解决了,可以分享一下!
2018年05月01日 03点05分 6
解决有段时间了,一直没看贴吧... 在Pycharm 2018中,开启DEBUG模式需要在pycharm右上角运行按钮左边的项目名称下,选择Edit Configurations,打开编辑界面后,把FLASK_DEBU勾选上。
2018年05月11日 06点05分
我按照你的方法试了还是不行呀,求指导,谢谢
2018年05月15日 01点05分
@FSlucky丶 请问一下,那同样是app.run里面的参数port和host这些怎么设置?
2018年08月18日 16点08分
level 10
我远程看看,274204379
2018年05月02日 02点05分 7
解决有段时间了,一直没看贴吧... 在Pycharm 2018中,开启DEBUG模式需要在pycharm右上角运行按钮左边的项目名称下,选择Edit Configurations,打开编辑界面后,把FLASK_DEBU勾选上。
2018年05月11日 06点05分
level 5
命令行:
set FLASK_DEBUG=1
flask run
2018年05月20日 00点05分 9
[大拇指]
2019年02月07日 05点02分
level 1
我用vscode 在调试配置里 假如了"env": {"FLASK_APP": "app.py","FLASK_DEBUG": "True","FLASK_ENV": "development" 这些设置,然后
Serving Flask app "app.py"
* Environment: development
* Debug mode: on
但是 并没有其效果,更改了return 里的内容 但是 http://127.0.0.1:5000/ 里的 内容不会更改。需要重启服务器
2018年08月15日 14点08分 11
level 1
设置DEBUG =
2018年08月16日 00点08分 12
level 1
Tree
2018年08月16日 00点08分 13
level 5
添加一个config文件试试
2018年08月25日 13点08分 14
level 1
最新版本不支持这么设置了
2018年08月27日 09点08分 15
level 2
if __name__=='__main__':
app.run('127.0.0.1',5000,debug=True)
这样就显示了 * Debugger is active!
2018年12月05日 02点12分 16
这个可以使用,很棒!
2019年01月04日 09点01分
level 1
因为你是在pycharm中运行了代码,直接在命令行下执行可以进入debug模式
2018年12月23日 11点12分 17
1 2 尾页