winpdb
winpdb copied to clipboard
Fix a bug
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)})
Hi
Good one. Can you propopose a pull request please ?
Thanks,
Philippe