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

Method bpformat

Lib/bdb.py:1046–1074  ·  view source on GitHub ↗

Return a string with information about the breakpoint. The information includes the breakpoint number, temporary status, file:line position, break condition, number of times to ignore, and number of times hit.

(self)

Source from the content-addressed store, hash-verified

1044 print(self.bpformat(), file=out)
1045
1046 def bpformat(self):
1047 """Return a string with information about the breakpoint.
1048
1049 The information includes the breakpoint number, temporary
1050 status, file:line position, break condition, number of times to
1051 ignore, and number of times hit.
1052
1053 """
1054 if self.temporary:
1055 disp = 'del '
1056 else:
1057 disp = 'keep '
1058 if self.enabled:
1059 disp = disp + 'yes '
1060 else:
1061 disp = disp + 'no '
1062 ret = '%-4dbreakpoint %s at %s:%d' % (self.number, disp,
1063 self.file, self.line)
1064 if self.cond:
1065 ret += '\n\tstop only if %s' % (self.cond,)
1066 if self.ignore:
1067 ret += '\n\tignore next %d hits' % (self.ignore,)
1068 if self.hits:
1069 if self.hits > 1:
1070 ss = 's'
1071 else:
1072 ss = ''
1073 ret += '\n\tbreakpoint already hit %d time%s' % (self.hits, ss)
1074 return ret
1075
1076 def __str__(self):
1077 "Return a condensed description of the breakpoint."

Callers 2

bpprintMethod · 0.95
do_breakMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected