-
Notifications
You must be signed in to change notification settings - Fork 0
1.2.5 Mode Debug
David Rigan edited this page Feb 11, 2020
·
1 revision
Debug mode ini berfungsi untuk menampilkan pesan error di web browser dan juga untuk memuat kembali server ketika ada perubahan di program kamu (Lazy Loading). Biasanya debug=True ini digunakan ketika development/pengembangan. Caranya gampang cukup ketikkan perintah ini di terminal:
Linux/Mac
(env) $ export FLASK_DEBUG=1 #1 untuk True
(env) $ export FLASK_ENV=development
(env) $ flask run
* Serving Flask app “app.py” (Lazy Loading)
* Environment: development
* Debug mode: on
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 172-185-267Windows
(env) $ set FLASK_DEBUG=1 #1 untuk True
(env) $ set FLASK_ENV=development
(env) $ flask run
* Serving Flask app “app.py” (Lazy Loading)
* Environment: development
* Debug mode: on
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 172-185-267Referensi :
- Miguel Grinberg - Flask Web Development, Developing Web Applications with Python