在mod_wsgi下运行时激活Flask调试器 [英] Activating the Flask debugger when running under mod_wsgi
问题描述
我将DEBUG,PROPAGATE_EXCEPTION和PRESERVE_CONTEXT_ON_EXCEPTION设置为True,但仍然没有出现调试器例如。
正如Flask文档所述:
http://flask.pocoo.org/docs/quickstart/#debug-mode 使用: 在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: 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屋!
$ p $ app.debug = True
app.debug = True