Prefer flask run --debug in docs

This commit is contained in:
Grey Li 2022-08-23 12:44:50 +08:00 committed by David Lord
parent 4bc0e4943d
commit bd26928fdb
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
9 changed files with 15 additions and 19 deletions

View file

@ -47,15 +47,15 @@ Debug Mode
The :data:`DEBUG` config value is special because it may behave inconsistently if
changed after the app has begun setting up. In order to set debug mode reliably, use the
``--debug`` option on the ``flask`` command. ``flask run`` will use the interactive
``--debug`` option on the ``flask run`` command. ``flask run`` will use the interactive
debugger and reloader by default in debug mode.
.. code-block:: text
$ flask --app hello --debug run
$ flask --app hello run --debug
Using the option is recommended. While it is possible to set :data:`DEBUG` in your
config or code, this is strongly discouraged. It can't be read early by the ``flask``
config or code, this is strongly discouraged. It can't be read early by the ``flask run``
command, and some systems or extensions may have already configured themselves based on
a previous value.