Logging- debug I/O to file
Is there a way to log the debug I/O output to file to overcome its limited buffer?
Another approach to this is to change sys.stdout and/or sys.stderr in your code to route output to a file. Something like:
import sys f = open('output.txt', 'w') old = sys.stdout sys.stdout = f ... sys.stdout = old f.close()
You can of course do this conditionally, possibly only when 'WINGDB_ACTIVE' in os.environ is true, which is only the case when Wing's debugger is active.
To enter a block of code: