在mod_wsgi下运行时激活Flask调试器 [英] Activating the Flask debugger when running under mod_wsgi

查看:159
本文介绍了在mod_wsgi下运行时激活Flask调试器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我将DEBUG,PROPAGATE_EXCEPTION和PRESERVE_CONTEXT_ON_EXCEPTION设置为True,但仍然没有出现调试器例如。

解决方案

正如Flask文档所述:

http://flask.pocoo.org/docs/quickstart/#debug-mode

使用:

$ p $ app.debug = True

在mod_wsgi下,您并没有执行app.run()。



确保您在全局范围设置app.debug,而不是在检查__name__是否为__main __的条件部分。


How can I activate the Flask debugger when running under mod_wsgi?

I have DEBUG, PROPAGATE_EXCEPTION and PRESERVE_CONTEXT_ON_EXCEPTION set to True, but still the debugger doesn't appear on exceptions.

解决方案

As described in the Flask documentation at:

http://flask.pocoo.org/docs/quickstart/#debug-mode

use:

app.debug = True

Under mod_wsgi you aren't doing the app.run() though.

Ensure you are setting 'app.debug' at global scope and not in a conditional section where checking whether __name__ is __main__.

这篇关于在mod_wsgi下运行时激活Flask调试器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆