#77 pythonwin debugger does not track changed files

pythonwin (177)

I have encountered a problem while running python
scripts under pythonwin debugger
It looks like the debugger does not track changes in
the imported files.

Here's the sequence to reproduce the problem:

1. Create two files with the following contents and
save them in the same directory:
File imptest.py:
def f(): print "f ()"

File test.py:
import imptest

if __name__=='__main__':
imptest.f ()

2. Open test.py in an IDE and select File -> Run...
(either with or without debugger)
"f ()"
will be printed in an interactive window

3. Now edit file imptest.py (no matter inside or
outside of the IDE) and change the funcion f() so that
it'd print something else, e.g.:
def f(): print "f () changed"

Then, run test.py again.
It will still print "f ()" instead of expected "f
() changed"

The change in code would not be reflected, unless IDE
is restarted or "reload(imptest)" is manually invoked
in an interactive window.


Log in to post a comment.