set flask_debug=1 code example Example 1: flask debug $ export FLASK_ENV=development $ flask run Example 2: flask debug app.run(debug=True)