Skip to content

Commit 24df8fc

Browse files
committed
show 'run --debug' in docs
Reverts commit 4d69165. Now that a release has this option, it's ok to show it in the docs. It had been reverted because the 2.2.x docs showed it before 2.2.3 was released.
1 parent b945f98 commit 24df8fc

File tree

8 files changed

+23
-15
lines changed

8 files changed

+23
-15
lines changed

docs/cli.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,22 @@ the ``--debug`` option.
9595

9696
.. code-block:: console
9797
98-
$ flask --app hello --debug run
98+
$ flask --app hello run --debug
9999
* Serving Flask app "hello"
100100
* Debug mode: on
101101
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
102102
* Restarting with inotify reloader
103103
* Debugger is active!
104104
* Debugger PIN: 223-456-919
105105
106+
The ``--debug`` option can also be passed to the top level ``flask`` command to enable
107+
debug mode for any command. The following two ``run`` calls are equivalent.
108+
109+
.. code-block:: console
110+
111+
$ flask --app hello --debug run
112+
$ flask --app hello run --debug
113+
106114
107115
Watch and Ignore Files with the Reloader
108116
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -550,7 +558,7 @@ a name such as "flask run".
550558
Click the *Script path* dropdown and change it to *Module name*, then input ``flask``.
551559

552560
The *Parameters* field is set to the CLI command to execute along with any arguments.
553-
This example uses ``--app hello --debug run``, which will run the development server in
561+
This example uses ``--app hello run --debug``, which will run the development server in
554562
debug mode. ``--app hello`` should be the import or file with your Flask app.
555563

556564
If you installed your project as a package in your virtualenv, you may uncheck the

docs/config.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,17 @@ Debug Mode
4747

4848
The :data:`DEBUG` config value is special because it may behave inconsistently if
4949
changed after the app has begun setting up. In order to set debug mode reliably, use the
50-
``--debug`` option on the ``flask`` command. ``flask run`` will use the interactive
51-
debugger and reloader by default in debug mode.
50+
``--debug`` option on the ``flask`` or ``flask run`` command. ``flask run`` will use the
51+
interactive debugger and reloader by default in debug mode.
5252

5353
.. code-block:: text
5454
55-
$ flask --app hello --debug run
55+
$ flask --app hello run --debug
5656
5757
Using the option is recommended. While it is possible to set :data:`DEBUG` in your
58-
config or code, this is strongly discouraged. It can't be read early by the ``flask run``
59-
command, and some systems or extensions may have already configured themselves based on
60-
a previous value.
58+
config or code, this is strongly discouraged. It can't be read early by the
59+
``flask run`` command, and some systems or extensions may have already configured
60+
themselves based on a previous value.
6161

6262

6363
Builtin Configuration Values

docs/debugging.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The debugger is enabled by default when the development server is run in debug m
4343

4444
.. code-block:: text
4545
46-
$ flask --app hello --debug run
46+
$ flask --app hello run --debug
4747
4848
When running from Python code, passing ``debug=True`` enables debug mode, which is
4949
mostly equivalent.
@@ -72,7 +72,7 @@ which can interfere.
7272

7373
.. code-block:: text
7474
75-
$ flask --app hello --debug run --no-debugger --no-reload
75+
$ flask --app hello run --debug --no-debugger --no-reload
7676
7777
When running from Python:
7878

docs/quickstart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ To enable debug mode, use the ``--debug`` option.
108108

109109
.. code-block:: text
110110
111-
$ flask --app hello --debug run
111+
$ flask --app hello run --debug
112112
* Serving Flask app 'hello'
113113
* Debug mode: on
114114
* Running on http://127.0.0.1:5000 (Press CTRL+C to quit)

docs/server.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ debug mode.
2424

2525
.. code-block:: text
2626
27-
$ flask --app hello --debug run
27+
$ flask --app hello run --debug
2828
2929
This enables debug mode, including the interactive debugger and reloader, and then
3030
starts the server on http://localhost:5000/. Use ``flask run --help`` to see the

docs/tutorial/factory.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ follow the tutorial.
137137

138138
.. code-block:: text
139139
140-
$ flask --app flaskr --debug run
140+
$ flask --app flaskr run --debug
141141
142142
You'll see output similar to this:
143143

examples/celery/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In a separate terminal, activate the virtualenv and run the Flask development se
1919

2020
```shell
2121
$ . ./.venv/bin/activate
22-
$ flask -A task_app --debug run
22+
$ flask -A task_app run --debug
2323
```
2424

2525
Go to http://localhost:5000/ and use the forms to submit tasks. You can see the polling

examples/tutorial/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Run
4848
.. code-block:: text
4949
5050
$ flask --app flaskr init-db
51-
$ flask --app flaskr --debug run
51+
$ flask --app flaskr run --debug
5252
5353
Open http://127.0.0.1:5000 in a browser.
5454

0 commit comments

Comments
 (0)