Using PDB and docker-compose

I’ve recently migrated my web application to run inside docker containers and use docker-compose to spin up all the required dependencies in their own containers (Postgres and Redis, in my case). This application uses Python’s Flask framework and I use pdb to debug issues.

stdin_open: true
tty: true
@bp.route('/', methods=['GET'])
def index():
import pdb; pdb.set_trace()
return render_template(‘site/index.html’)
-> return render_template(‘site/index.html’)

I’m a software engineer that specializes in front-end web development. Learn more at

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store