python - 怎样在linux下开发flask web应用时查看代码出错(traceback)的地方。
天蓬老师
天蓬老师 2017-04-18 10:23:11
0
3
624

怎样在linux下开发flask web应用的时候可以向Windows一样通过cmd命令行查看到代码出错的地方。
Windows下:
1.通过cmd启动Lighttpd,打开网页调用flask web应用testwsgi.py,网页出现500 - Internal Server Error 在cmd查看错误信息。

2.通过linux执行开启Lighttpd服务后,打开网页调用flask web应用testwsgi.py,网页出现500 - Internal Server Error 没有地方可以看出程序出错的信息,怎么解决

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(3)
阿神

Have you turned on debugging mode

洪涛

app.run(debug=True)

小葫芦

There is no place to see program error information

Yes. Error reports will be written to the error log. The specific file it is in depends on how you execute the WSGI program. lighttpd happens to be the one I don't know about...but if you haven't configured anything else, you can be sure that the errors are collected by lighttpd, just look at its error log.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template