#434 Jython 2.1 debug mode steps over insted of into

1.3.6
closed-fixed
debugger (210)
5
2008-01-15
2007-02-18
ashu27a
No

Environment:
jython 2.1
python 2.5
java 1.4.2, 1.5.0
Eclipse 3.2.1 / 3.2.2
pydev 1.2.6 / 1.2.7

Created a simple Python/Jython project with one class, one main, and no java refs and code runs fine within Eclipse, in both Python and Jython.

Debug breakpoints are good and program will step through "main"
The step into function actually steps over in jython. However same code debugs fine with step into if done as python code.

Discussion

  • Fabio Zadrozny

    Fabio Zadrozny - 2007-02-19
    • status: open --> pending
     
  • Fabio Zadrozny

    Fabio Zadrozny - 2007-02-19

    Logged In: YES
    user_id=617340
    Originator: NO

    I've just tested with: jython 2.1 / eclipse 3.2.1 / pydev 1.2.7...

    Here, with the code below and a breakpoint at line 10 (self.call1()), pressing F5 will step into line 6 (a=10)... does that fail there?

    import unittest

    class TestCase(unittest.TestCase):

    def call1(self):
    a = 10
    print a

    def testMet1(self):
    self.call1()

    if __name__ == '__main__':
    unittest.main()

     
  • ashu27a

    ashu27a - 2007-02-20
    • status: pending --> open
     
  • ashu27a

    ashu27a - 2007-02-20

    Logged In: YES
    user_id=1720257
    Originator: YES

    Got some odd results... First it did not step to line 6. Then, while the first debug session was running, I started another debug session and using F5, it stepped to line 6.

    That's some progress! look at the pice of code below:
    class spaceship:

    def rockets(self,n):
    self.rockets = n
    print self.rockets

    def color(self,c):
    self.color = c
    print self.color

    if __name__ == '__main__':

    tc = spaceship()
    tc.rockets(4)
    tc.color("Purple")

    ===> breakpoints on 8, 13
    at the first breakpoint, F5 will go to 14 and then step into 3, but only on the 2nd active debug session.
    secondly, going to the next step on line 15, there is no situation that it will step into line 8 (2nd breakpoint), either using F5 or "continue"

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2007-02-20
    • status: open --> pending
     
  • Fabio Zadrozny

    Fabio Zadrozny - 2007-02-20

    Logged In: YES
    user_id=617340
    Originator: NO

    try the following: go to plugins/org.python.pydev.debug/pysrc/pydevd_frame.py and comment out the lines 42-45 so that it looks:

    # else:
    # #print 'NOT skipped', self.base, frame.f_lineno, additionalInfo.pydev_state, additionalInfo.pydev_step_stop, additionalInfo.pydev_step_cmd
    # #We just hit a breakpoint or we are already in step mode. Either way, let's trace this frame
    # frame.f_trace = self.trace_dispatch

    and see if it works... this should actually not be a problem, but it appears to confuse jython (and the debug logic does not seem to need that anymore)

    p.s. erase all .class and .pyc files in that dir (just to be sure that it will reload it without problems)

     
  • ashu27a

    ashu27a - 2007-02-20

    Logged In: YES
    user_id=1720257
    Originator: YES

    Commented out the lines, deleted the .class and .pyc files.
    Result was not positive, and it consistently stepped over function calls. Previously, on the second debug session, the 1st time it would step in and never again. With the code commented out it steps over every time.

     
  • ashu27a

    ashu27a - 2007-02-20
    • status: pending --> open
     
  • Fabio Zadrozny

    Fabio Zadrozny - 2007-05-12

    Logged In: YES
    user_id=617340
    Originator: NO

    Ok, the debugger was actually relying on some things that jython does not have (see bug at jython: http://sourceforge.net/tracker/index.php?func=detail&aid=1717775&group_id=12867&atid=112867\), so, it will probably have to be reworked all the way taking into account the jython limitations (however, if someone at jython is able to tackle those limitations, it might be a better solution, and it's probably related)

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2007-06-22
    • status: open --> closed-fixed
     
  • Fabio Zadrozny

    Fabio Zadrozny - 2007-06-22

    Logged In: YES
    user_id=617340
    Originator: NO

    Ok, this should be fixed for 1.3.5 (already released)

     
  • ashu27a

    ashu27a - 2007-07-05
    • milestone: 679521 --> 1.3.6
    • status: closed-fixed --> open-wont-fix
     
  • ashu27a

    ashu27a - 2007-07-05

    Logged In: YES
    user_id=1720257
    Originator: YES

    Continue to get repeatable stepping over in debug mode as before.
    tried combinations of pydev 1.3.5, 1.3.6 and jython 2.1, 2.2rc1

    oddly, using jython 2.2rc1, eclipse seems to be stuck in remote debug mode and am unable to test.

    tried to use jython 2.2rc1 as the info at the jython bug report (link) indicated that the issue would be resolved in 2.2rc1

    thanks

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2007-09-10

    Logged In: YES
    user_id=617340
    Originator: NO

    Please check that with 1.3.9 -- there were some changes which should fix it...

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2007-09-10
    • status: open-wont-fix --> pending-fixed
     
  • Nobody/Anonymous

    Logged In: NO

    1.3.9 does not fix the debug step over issue

     
  • ashu27a

    ashu27a - 2007-09-11
    • status: pending-fixed --> open-fixed
     
  • ashu27a

    ashu27a - 2007-09-11

    Logged In: YES
    user_id=1720257
    Originator: YES

    Pydev 1.3.9 does not resolve the step over issue when debugging Jython 2.1 code

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2008-01-15

    Logged In: YES
    user_id=617340
    Originator: NO

    Should be fixed for 1.3.11

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2008-01-15
    • status: open-fixed --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks