debug() — flask Function Reference
Architecture documentation for the debug() function in app.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD a2acbfc3_d486_fd85_1cac_86e38627ed40["debug()"] 38f6d4a2_834e_2acd_e1b6_f45c58079ccd["App"] a2acbfc3_d486_fd85_1cac_86e38627ed40 -->|defined in| 38f6d4a2_834e_2acd_e1b6_f45c58079ccd style a2acbfc3_d486_fd85_1cac_86e38627ed40 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/flask/sansio/app.py lines 547–557
def debug(self) -> bool:
"""Whether debug mode is enabled. When using ``flask run`` to start the
development server, an interactive debugger will be shown for unhandled
exceptions, and the server will be reloaded when code changes. This maps to the
:data:`DEBUG` config key. It may not behave as expected if set late.
**Do not enable debug mode when deploying in production.**
Default: ``False``
"""
return self.config["DEBUG"] # type: ignore[no-any-return]
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does debug() do?
debug() is a function in the flask codebase, defined in src/flask/sansio/app.py.
Where is debug() defined?
debug() is defined in src/flask/sansio/app.py at line 547.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free