Skip to content

Commit

Permalink
Add tips for debug config with flask cli (pallets#2196)
Browse files Browse the repository at this point in the history
* Add tips for debug config with flask cli

`app.debug` and `app.config['DEBUG']` are not compatible with the `flask` script.

* Grammar fix

* Grammar fix
  • Loading branch information
greyli authored and untitaker committed Mar 4, 2017
1 parent fca5577 commit c435607
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion docs/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,21 @@ method::
SECRET_KEY='...'
)

.. admonition:: Debug Mode with the ``flask`` Script

If you use the :command:`flask` script to start a local development
server, to enable the debug mode, you need to export the ``FLASK_DEBUG``
environment variable before running the server::

$ export FLASK_DEBUG=1
$ flask run

(On Windows you need to use ``set`` instead of ``export``).

``app.debug`` and ``app.config['DEBUG']`` are not compatible with
  the :command:`flask` script. They only worked when using ``Flask.run()``
method.

Builtin Configuration Values
----------------------------

Expand All @@ -52,7 +67,8 @@ The following configuration values are used internally by Flask:
.. tabularcolumns:: |p{6.5cm}|p{8.5cm}|

================================= =========================================
``DEBUG`` enable/disable debug mode
``DEBUG`` enable/disable debug mode when using
``Flask.run()`` method to start server
``TESTING`` enable/disable testing mode
``PROPAGATE_EXCEPTIONS`` explicitly enable or disable the
propagation of exceptions. If not set or
Expand Down

0 comments on commit c435607

Please sign in to comment.