MCPcopy Index your code
hub / github.com/python/cpython / clear_break

Method clear_break

Lib/bdb.py:710–725  ·  view source on GitHub ↗

Delete breakpoints for filename:lineno. If no breakpoints were set, return an error message.

(self, filename, lineno)

Source from the content-addressed store, hash-verified

708 del self.breaks[filename]
709
710 def clear_break(self, filename, lineno):
711 """Delete breakpoints for filename:lineno.
712
713 If no breakpoints were set, return an error message.
714 """
715 filename = self.canonic(filename)
716 if filename not in self.breaks:
717 return 'There are no breakpoints in %s' % filename
718 if lineno not in self.breaks[filename]:
719 return 'There is no breakpoint at %s:%d' % (filename, lineno)
720 # If there's only one bp in the list for that file,line
721 # pair, then remove the breaks entry
722 for bp in Breakpoint.bplist[filename, lineno][:]:
723 bp.deleteMe()
724 self._prune_breaks(filename, lineno)
725 return None
726
727 def clear_bpbynumber(self, arg):
728 """Delete a breakpoint by its index in Breakpoint.bpbynumber.

Callers 3

set_clearMethod · 0.95
do_clearMethod · 0.45

Calls 3

canonicMethod · 0.95
_prune_breaksMethod · 0.95
deleteMeMethod · 0.80

Tested by 2

set_clearMethod · 0.76