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

Method clear_break

Lib/bdb.py:719–734  ·  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

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

Callers 3

set_clearMethod · 0.95
do_clearMethod · 0.80

Calls 3

canonicMethod · 0.95
_prune_breaksMethod · 0.95
deleteMeMethod · 0.80

Tested by 2

set_clearMethod · 0.76