Skip to content
Myr

Added an example of how to configure debugging with run_simple, it has to be enabled both for the Flask app and the Werkzeug server.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by jtsoi · committed by jtsoi · parent eac350d · Browse files · 1 file+17 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+17 added−0 removed

  • other:+17 added−0 removed

1 file+17 added−0 removed

modified:docs/patterns/appdispatch.rst+17 added
28 unmodified lines
2930Note that :func:`run_simple <werkzeug.serving.run_simple>` is not intended for31use in production. Use a :ref:`full-blown WSGI server <deployment>`.3233In order to use the interactive debuggger, debugging must be enables both on 34the application and the simple server, here is the "hello world" example with debugging and 35:func:`run_simple <werkzeug.serving.run_simple>` :3637 from flask import Flask38 from werkzeug.serving import run_simple3940 app = Flask(__name__)41 app.debug = True4243 @app.route('/')44 def hello_world():45 return 'Hello World!'4647 if __name__ == '__main__':48 run_simple('localhost', 5000, app, use_reloader=True, use_debugger=True, use_evalex=True)495051Combining Applications52----------------------5354If you have entirely separated applications and you want them to work next
133 unmodified lines