Skip to content
Myr

Merge pull request #5066 from pallets/docs-passthrough

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

document passthrough_errors

authored by David Lord · committed by GitHub · parents 87698a2, 5bba529 · Browse files · 1 file+20 added−8 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+20 added−8 removed

  • other:+20 added−8 removed

1 file+20 added−8 removed

modified:docs/debugging.rst+20 added-8 removed
64 unmodified lines
65be used to step through code during a request before an error is raised,66or if no error is raised. Some even have a remote mode so you can debug67code running on another machine.6869When using an external debugger, the app should still be in debug mode,70but it can be useful to disable the built-in debugger and reloader,71which can interfere.69When using an external debugger, the app should still be in debug mode, otherwise Flask70turns unhandled errors into generic 500 error pages. However, the built-in debugger and71reloader should be disabled so they don't interfere with the external debugger.7273.. code-block:: text7475 $ flask --app hello run --debug --no-debugger --no-reload
3 unmodified lines
79.. code-block:: python8081 app.run(debug=True, use_debugger=False, use_reloader=False)8283Disabling these isn't required, an external debugger will continue to84work with the following caveats. If the built-in debugger is not85disabled, it will catch unhandled exceptions before the external86debugger can. If the reloader is not disabled, it could cause an87unexpected reload if code changes during debugging.83Disabling these isn't required, an external debugger will continue to work with the84following caveats.8586- If the built-in debugger is not disabled, it will catch unhandled exceptions before87 the external debugger can.88- If the reloader is not disabled, it could cause an unexpected reload if code changes89 during a breakpoint.90- The development server will still catch unhandled exceptions if the built-in91 debugger is disabled, otherwise it would crash on any error. If you want that (and92 usually you don't) pass ``passthrough_errors=True`` to ``app.run``.9394 .. code-block:: python9596 app.run(97 debug=True, passthrough_errors=True,98 use_debugger=False, use_reloader=False99 )