Issue2498

classification
Title: Jython 2.7.0 pdb library (jump command) is not working
Type: behaviour Severity: urgent
Components: Core Versions: Jython 2.7
Milestone: Jython 2.7.0
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: snargul, zyasoft
Priority: Keywords:

Created on 2016-05-04.12:30:08 by snargul, last changed 2016-09-08.23:40:46 by zyasoft.

Messages
msg10853 (view) Author: samet (snargul) Date: 2016-05-04.12:30:06
I'm using; 
java 1.8 64-bit
python 3.5
jython 2.7
I have java methods needed to be reached from a python file. This is why I am using jython. And, I need to use a python debugger from java executor. Therefore, I'm creating a java process with the command "jython -m pdb script.py". 
Jump command is a critical command for my usage. However, it does not work. "TypeError: readonly attribute" error is given at line 705 in jython\lib pdb.py file, which is "self.curframe.f_lineno = arg".
msg10855 (view) Author: samet (snargul) Date: 2016-05-09.13:16:04
I tried to execute "jump" command of pdb lib. I'm using Jython (in a Java application). Command comes with this error:
Traceback (most recent call last):
  File "C:\pdb_jump.py", line 20, in <module>
    result = []
  File "C:\jython\Lib\bdb.py", line 49, in trace_dispatch
    return self.dispatch_line(frame)
  File "C:\jython\Lib\bdb.py", line 67, in dispatch_line
    self.user_line(frame)
  File "C:\jython\Lib\pdb.py", line 158, in user_line
    self.interaction(frame, None)
  File "C:\jython\Lib\pdb.py", line 210, in interaction
    self.cmdloop()
  File "C:\jython\Lib\cmd.py", line 142, in cmdloop
    stop = self.onecmd(line)
  File "C:\jython\Lib\pdb.py", line 279, in onecmd
    return cmd.Cmd.onecmd(self, line)
  File "C:\jython\Lib\cmd.py", line 221, in onecmd
    return func(arg)
  File "C:\jython\Lib\pdb.py", line 705, in do_jump
    self.curframe.f_lineno = arg
  File "C:\jython\Lib\pdb.py", line 705, in do_jump
    self.curframe.f_lineno = arg
TypeError: readonly attribute
It seems "jump" command does not work. arg type is integer and this value cannot be set to "self.curframe.f_lineno".
Java version: 1.8 64-bit, Jython versin: 2.7
msg10946 (view) Author: Jim Baker (zyasoft) Date: 2016-09-08.23:40:45
This functionality only works on Python bytecode - there's no way to do this in Java bytecode. Sorry about that, it's a basic limitation of running on the JVM.
History
Date User Action Args
2016-09-08 23:40:46zyasoftsetstatus: open -> closed
resolution: rejected
messages: + msg10946
nosy: + zyasoft
2016-05-25 09:06:08snargulsettitle: Jython 2.7.0 jump command is not working -> Jython 2.7.0 pdb library (jump command) is not working
2016-05-09 13:16:05snargulsetmessages: + msg10855
2016-05-04 12:30:08snargulcreate