I love using a debugger when I code. It allows me to quickly understand why something does not work as intended, but also to get a faster and deeper understanding of code I did not write.

Since I am so fond of using a debugger, when I started working on a Dockerized Flask application, my first online search was to find how to set one up for my application. But all the solutions I found had different flaws:

  • ❌ The application port would be changed every time I started the application with the debugger
  • ❌ Flask’s wonderful hot-reload feature (the server restarting after saving changes to the code) was not supported
  • ❌ The usage was clunky. To make the debugger work, I had to consistently add then remove multiple lines of work

So, I decided to craft my own debugger setup to fix all those problems.

Let’s see how to setup a Dockerized Flask app with an efficient debugging flow πŸŽ‰!

#flask #vscode #docker #visual-studio

Flask Debugging in VS Code with Hot-Reload πŸ”₯
14.00 GEEK