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

Method bpformat

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

1053 print(self.bpformat(), file=out)
1054
1055 def bpformat(self):
1056 """Return a string with information about the breakpoint.
1057
1058 The information includes the breakpoint number, temporary
1059 status, file:line position, break condition, number of times to
1060 ignore, and number of times hit.
1061
1062 """
1063 if self.temporary:
1064 disp = 'del '
1065 else:
1066 disp = 'keep '
1067 if self.enabled:
1068 disp = disp + 'yes '
1069 else:
1070 disp = disp + 'no '
1071 ret = '%-4dbreakpoint %s at %s:%d' % (self.number, disp,
1072 self.file, self.line)
1073 if self.cond:
1074 ret += '\n\tstop only if %s' % (self.cond,)
1075 if self.ignore:
1076 ret += '\n\tignore next %d hits' % (self.ignore,)
1077 if self.hits:
1078 if self.hits > 1:
1079 ss = 's'
1080 else:
1081 ss = ''
1082 ret += '\n\tbreakpoint already hit %d time%s' % (self.hits, ss)
1083 return ret
1084
1085 def __str__(self):
1086 "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