In CalcScopeLine(), when insert the line "print(rvl)" below "rvl.reverse()", sometimes you can see wrong lineno
which is larger than the debugee file has. This error was caused by CalcValidLines() which is buggy.
Replace it with the following new def can get rid of this bug and makes rpdb2 more reliable.
import dis
def CalcValidLines(code):
return sorted({lineno for _, lineno in dis.findlinestarts(code)})
In CalcScopeLine(), when insert the line "print(rvl)" below "rvl.reverse()", sometimes you can see wrong lineno
which is larger than the debugee file has. This error was caused by CalcValidLines() which is buggy.
Replace it with the following new def can get rid of this bug and makes rpdb2 more reliable.
import dis
def CalcValidLines(code):
return sorted({lineno for _, lineno in dis.findlinestarts(code)})