https://flask.palletsprojects.com/en/3.0.x/config/#debug-mode
While it is possible to set DEBUG in your config or code, this is strongly discouraged. It can’t be read early by the flask run command, and some systems or extensions may have already configured themselves based on a previous value.