我试图找出Flask交互式调试器无法正常工作的原因.我的模板应用程序是准系统,只有一个错误:
from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): print missing_variable #Error return 'Hello World!' if __name__ == '__main__': app.run(host='0.0.0.0',debug=True)
但调试器捕获错误,但给了我一个非交互式页面,并抱怨缺少Javascript:
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error. If you enable JavaScript you can also use additional features such as code execution (if the evalex feature is enabled),automatic pasting of the exceptions and much more.
我没有禁用Javascript,所以我不确定为什么这个交互式调试器坏了.谢谢!
编辑:我在远程主机上运行它并通过SSH隧道查看.是否有可能以这种方式禁用Javascript?