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

Method do_ignore

Lib/pdb.py:1632–1675  ·  view source on GitHub ↗

ignore bpnumber [count] Set the ignore count for the given breakpoint number. If count is omitted, the ignore count is set to 0. A breakpoint becomes active when the ignore count is zero. When non-zero, the count is decremented each time the breakpoint is reached

(self, arg)

Source from the content-addressed store, hash-verified

1630 complete_condition = _complete_bpnumber
1631
1632 def do_ignore(self, arg):
1633 """ignore bpnumber [count]
1634
1635 Set the ignore count for the given breakpoint number. If
1636 count is omitted, the ignore count is set to 0. A breakpoint
1637 becomes active when the ignore count is zero. When non-zero,
1638 the count is decremented each time the breakpoint is reached
1639 and the breakpoint is not disabled and any associated
1640 condition evaluates to true.
1641 """
1642 if not arg:
1643 self._print_invalid_arg(arg)
1644 return
1645 args = arg.split()
1646 if not args:
1647 self.error('Breakpoint number expected')
1648 return
1649 if len(args) == 1:
1650 count = 0
1651 elif len(args) == 2:
1652 try:
1653 count = int(args[1])
1654 except ValueError:
1655 self._print_invalid_arg(arg)
1656 return
1657 else:
1658 self._print_invalid_arg(arg)
1659 return
1660 try:
1661 bp = self.get_bpbynumber(args[0].strip())
1662 except ValueError as err:
1663 self.error(err)
1664 else:
1665 bp.ignore = count
1666 if count > 0:
1667 if count > 1:
1668 countstr = '%d crossings' % count
1669 else:
1670 countstr = '1 crossing'
1671 self.message('Will ignore next %s of breakpoint %d.' %
1672 (countstr, bp.number))
1673 else:
1674 self.message('Will stop next time breakpoint %d is reached.'
1675 % bp.number)
1676
1677 complete_ignore = _complete_bpnumber
1678

Callers

nothing calls this directly

Calls 6

_print_invalid_argMethod · 0.95
errorMethod · 0.95
messageMethod · 0.95
get_bpbynumberMethod · 0.80
splitMethod · 0.45
stripMethod · 0.45

Tested by

no test coverage detected