How to debug a Flask app
If you are running it locally and want to be able to step through the code:
python -m pdb script.py
How are you meant to debug errors in Flask?  Print to the console?  Flash messages to the page?  Or is there a more powerful option available to figure out what's happening when something goes wrong?