I am currently trying to debug an app that I have not written myself. I have narrowed the problem down to a particular method that is imported from a module outside of the current script. I would like to step through this module by writing to a file at each step, however it doesn't seem to work.
I have a version of the app that is running correctly and when I write to a file from within the module, the script runs fine but no file is created. Am I missing something here?
Example
Script that I am debugging
from module import method
example code ...
method(data) --- where error occurs
more code ...
module.py
def method(data):
file = open('filetowrite.txt','w')
file.write('something ....')
file.close()