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

Method do_ignore

tools/python-3.11.9-amd64/Lib/pdb.py:898–929  ·  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 reach

(self, arg)

Source from the content-addressed store, hash-verified

896 complete_condition = _complete_bpnumber
897
898 def do_ignore(self, arg):
899 """ignore bpnumber [count]
900 Set the ignore count for the given breakpoint number. If
901 count is omitted, the ignore count is set to 0. A breakpoint
902 becomes active when the ignore count is zero. When non-zero,
903 the count is decremented each time the breakpoint is reached
904 and the breakpoint is not disabled and any associated
905 condition evaluates to true.
906 """
907 args = arg.split()
908 try:
909 count = int(args[1].strip())
910 except:
911 count = 0
912 try:
913 bp = self.get_bpbynumber(args[0].strip())
914 except IndexError:
915 self.error('Breakpoint number expected')
916 except ValueError as err:
917 self.error(err)
918 else:
919 bp.ignore = count
920 if count > 0:
921 if count > 1:
922 countstr = '%d crossings' % count
923 else:
924 countstr = '1 crossing'
925 self.message('Will ignore next %s of breakpoint %d.' %
926 (countstr, bp.number))
927 else:
928 self.message('Will stop next time breakpoint %d is reached.'
929 % bp.number)
930
931 complete_ignore = _complete_bpnumber
932

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected