<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # 05 debug模式詳解 ## 為什么需要開啟debug模式: 1.如果開啟了DEBUG模式,那么在代碼中如果拋出了異常,在瀏覽器的頁面中可以看到具體的錯誤信息,以及具體的錯誤代碼位置,方便開發者調試 2.如果開啟了debug模式,那么以后在python代碼中修改了任何代碼,只要按"ctrl+s",'flask'就會自動的重新記載整個網站,不需要手動點擊重新運行。 ## 配置debug模型的四種方式 1.在'app.run\(\)'中傳遞一個參數'debug=True'就可以開啟'DEBUG'模式 1.1.app.run\(debug=True\) 2.給'app.debug=True'也可以開啟'debug'模式 2.1.app.debug = True 3.通過配置參數的形式設置DEBUG模式,'app.config.update\(DEBUG=True\)' 3.1.app.config.update\(DEBUG=True\) 4.通過配置文件的形式設置DEBUG模式:'app.config.from\_object\(config\)' ## PING碼 如果想要在網頁上調試代碼,name應該輸入'PIN'碼 ```text from flask import Flask, config app = Flask(__name__) # app.debug = True # 設置配置參數的形式 # DEBUG必須要大寫,不能小寫 # app.config.from_object(config) app.config.update(DEBUG=True) # print(isinstance(app.config.dict)) @app.route('/') def hello_world(): return 'Hello World!' if __name__ == '__main__': # app.run(debug=True) app.run() ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看