Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set break points in Tornado app

How could I set a break point in my tornado app?
I tried pdb, but Tornado app seams to be ignoring my pdb.set_trace() command in my app.

like image 369
Joel James Avatar asked Sep 01 '25 17:09

Joel James


1 Answers

If you are running your app using foreman you would set you environment variable in .env file in root project folder. Setting the below env variable in my .env file did the tick form me.

PYTHONUNBUFFERED=true

Now I can set code breakpoints in my app, and also print output to server logs while running the app using foreman.

like image 195
Joel James Avatar answered Sep 04 '25 22:09

Joel James