Debug Flask Applications with PyCharm

Thilina Madumal
1 min readOct 9, 2018

Debugging is inevitable when you are not a brilliant programmer. I’m a terrible programmer and debugging is the only way for survival:). Even though debugging flask applications with PyCharm IDE is as simple as bread and butter, tend to forget it time to time, thus thought of making note of it.

if __name__ == '__main__':
app.run()

Insert the above in any place you’d like. Make sure you have done the imports right. Here to run() method you can give whatever the parameters you desire.

Then, right-click on the script that you have put the above code snippet and click on debug. Add debug points wherever you want and happy debugging. Hola!

For people who know python and PyCharm, yep, you got it right :), that’s how you debug a python script with PyCharm.

--

--