您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

python – Flask Interactive Debugger Broken

5b51 2022/1/14 8:20:24 python 字数 1661 阅读 549 来源 www.jb51.cc/python

我试图找出Flask交互式调试器无法正常工作的原因.我的模板应用程序是准系统,只有一个错误: from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): print missing_variable #Error return 'Hello World!' if __name_

概述

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?

总结

以上是编程之家为你收集整理的python – Flask Interactive Debugger Broken全部内容,希望文章能够帮你解决python – Flask Interactive Debugger Broken所遇到的程序开发问题。


如果您也喜欢它,动动您的小指点个赞吧

除非注明,文章均由 laddyq.com 整理发布,欢迎转载。

转载请注明:
链接:http://laddyq.com
来源:laddyq.com
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。


联系我
置顶