--- a/DebugClients/Python/DebugBase.py Wed Sep 28 22:34:54 2016 +0200 +++ b/DebugClients/Python/DebugBase.py Tue Oct 04 21:14:28 2016 +0200 @@ -566,15 +566,18 @@ return False lineNo = frame.f_code.co_firstlineno lineNumbers = [lineNo] + + if sys.version_info[0] == 2: + co_lnotab = map(ord, frame.f_code.co_lnotab[1::2]) + else: + co_lnotab = frame.f_code.co_lnotab[1::2] + # No need to handle special case if a lot of lines between # (e.g. closure), because the additional lines won't cause a bp - for co_lno in frame.f_code.co_lnotab[1::2]: + for co_lno in co_lnotab: lineNo += co_lno lineNumbers.append(lineNo) - if sys.version_info[0] == 2: - lineNo = map(ord, lineNo) - for bp in Breakpoint.breakInFile[filename]: if bp in lineNumbers: Breakpoint.breakInFrameCache[