Adding sys.stdout.flush() after the print statements solved this problem for me.
In my case, the problem was that stdout is buffered, but stderr is not.
If you don’t even see an exception through foreman start , make sure that you are actually clicking on your server on the correct IP / PORT. You should see HTTP access entries (e.g. GET / index.html) at the exit from foreman start .
In addition, you can try using the web framework to work in debug mode - most modern frameworks will display stacks in the browser in debug / dev mode. Using a flask? app.config['DEBUG'] = True or app.run(..., debug=True) .
# logging helper def p(*args): print args[0] % (len(args) > 1 and args[1:] or []) sys.stdout.flush()
cameronboehmer
source share