MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / clear_break

Method clear_break

tools/python-3.11.9-amd64/Lib/bdb.py:416–431  ·  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

414 del self.breaks[filename]
415
416 def clear_break(self, filename, lineno):
417 """Delete breakpoints for filename:lineno.
418
419 If no breakpoints were set, return an error message.
420 """
421 filename = self.canonic(filename)
422 if filename not in self.breaks:
423 return 'There are no breakpoints in %s' % filename
424 if lineno not in self.breaks[filename]:
425 return 'There is no breakpoint at %s:%d' % (filename, lineno)
426 # If there's only one bp in the list for that file,line
427 # pair, then remove the breaks entry
428 for bp in Breakpoint.bplist[filename, lineno][:]:
429 bp.deleteMe()
430 self._prune_breaks(filename, lineno)
431 return None
432
433 def clear_bpbynumber(self, arg):
434 """Delete a breakpoint by its index in Breakpoint.bpbynumber.

Callers 1

do_clearMethod · 0.45

Calls 3

canonicMethod · 0.95
_prune_breaksMethod · 0.95
deleteMeMethod · 0.80

Tested by

no test coverage detected