MCPcopy Index your code
hub / github.com/RustPython/RustPython / break_here

Method break_here

Lib/bdb.py:455–480  ·  view source on GitHub ↗

Return True if there is an effective breakpoint for this line. Check for line or function breakpoint and if in effect. Delete temporary breakpoints if effective() says to.

(self, frame)

Source from the content-addressed store, hash-verified

453 return False
454
455 def break_here(self, frame):
456 """Return True if there is an effective breakpoint for this line.
457
458 Check for line or function breakpoint and if in effect.
459 Delete temporary breakpoints if effective() says to.
460 """
461 filename = self.canonic(frame.f_code.co_filename)
462 if filename not in self.breaks:
463 return False
464 lineno = frame.f_lineno
465 if lineno not in self.breaks[filename]:
466 # The line itself has no breakpoint, but maybe the line is the
467 # first line of a function with breakpoint set by function name.
468 lineno = frame.f_code.co_firstlineno
469 if lineno not in self.breaks[filename]:
470 return False
471
472 # flag says ok to delete temp. bp
473 (bp, flag) = effective(filename, lineno, frame)
474 if bp:
475 self.currentbp = bp.number
476 if (flag and bp.temporary):
477 self.do_clear(str(bp.number))
478 return True
479 else:
480 return False
481
482 def do_clear(self, arg):
483 """Remove temporary breakpoint.

Callers 1

dispatch_lineMethod · 0.95

Calls 4

canonicMethod · 0.95
do_clearMethod · 0.95
effectiveFunction · 0.85
strFunction · 0.85

Tested by

no test coverage detected