I\'m new to flask, and I\'m trying to add print info to debug server side code. When launch my flask app with debug=True, i can\'t get any info print to console
I tr
You can force to flush stdout directly from print:
print('enter getJSONReuslt', flush=True)
This way you don't have to print to sys.stderr (which flushes by default).
The reason for your problem is line buffering. Line buffering makes I/O more efficient with the drawback of not immediately showing prints under some conditions.