i've installed PyDev 1.6.1 using Jython 2.1 into Eclipse 3.5 (Galileo) under Ubuntu 10. Everything seems to work as advertised, except for remote debugging using settrace(). I start the remote debugging server on the default port (5678). I Run my Jython module. The first time the Jython code encounters a settrace() statement, it takes the breakpoint, but stops in module weakref at line 80, here:
If I run this in Eclipse (using Run as Jython), it appears to stop at line 80 of a module named weakref, and described as, "Weak reference support for Python.":
If I then click Continue, the second breakpoint is correctly taken and I can Step (F6) through the remaining Jython statements:
8 print 'Breakpoint 2' <=== Stops here
Pretty simple. I just don't understand why it appears to stop in weakref at all, instead of at the first breakpoint, following the first settrace() statement.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i've installed PyDev 1.6.1 using Jython 2.1 into Eclipse 3.5 (Galileo) under Ubuntu 10. Everything seems to work as advertised, except for remote debugging using settrace(). I start the remote debugging server on the default port (5678). I Run my Jython module. The first time the Jython code encounters a settrace() statement, it takes the breakpoint, but stops in module weakref at line 80, here:
80 def __setitem__(self, key, value): <== Stops here
self.data = KeyedRef(value, self._remove, key)
If I step (F6), it steps out of this method and returns to line 97 of module threading
Stepping out of that, it never stops at the line following settrace() in my Jython code.
However, if I add a second settrace() statement, it does stop at the line following that statement in the Jython code. For example,
import pydevd; settrace() <=== Stops at weakref:80
print 'Breakpoint 1' <=== Does NOT stop here
settrace()
print 'Breakpoint 2' <=== Stops here
Can someone tell me what's going on and/or what I'm doing wrong?
Strange, that does not happen for me… are you testing in a module with just that content or do you have more code there to reproduce it?
Cheers,
Fabio
Thanks, Fabio. Here's my test Jython code, in its entirety:
If I run this in Eclipse (using Run as Jython), it appears to stop at line 80 of a module named weakref, and described as, "Weak reference support for Python.":
If I then click Continue, the second breakpoint is correctly taken and I can Step (F6) through the remaining Jython statements:
Pretty simple. I just don't understand why it appears to stop in weakref at all, instead of at the first breakpoint, following the first settrace() statement.