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

Method break_here

tools/python-3.11.9-amd64/Lib/bdb.py:217–242  ·  view source on GitHub ↗

Return True if there is an effective breakpoint for this line. Check for line or function breakpoint and if in effect. Delete temporary breakpoints if effective() says to.

(self, frame)

Source from the content-addressed store, hash-verified

215 return False
216
217 def break_here(self, frame):
218 """Return True if there is an effective breakpoint for this line.
219
220 Check for line or function breakpoint and if in effect.
221 Delete temporary breakpoints if effective() says to.
222 """
223 filename = self.canonic(frame.f_code.co_filename)
224 if filename not in self.breaks:
225 return False
226 lineno = frame.f_lineno
227 if lineno not in self.breaks[filename]:
228 # The line itself has no breakpoint, but maybe the line is the
229 # first line of a function with breakpoint set by function name.
230 lineno = frame.f_code.co_firstlineno
231 if lineno not in self.breaks[filename]:
232 return False
233
234 # flag says ok to delete temp. bp
235 (bp, flag) = effective(filename, lineno, frame)
236 if bp:
237 self.currentbp = bp.number
238 if (flag and bp.temporary):
239 self.do_clear(str(bp.number))
240 return True
241 else:
242 return False
243
244 def do_clear(self, arg):
245 """Remove temporary breakpoint.

Callers 1

dispatch_lineMethod · 0.95

Calls 4

canonicMethod · 0.95
do_clearMethod · 0.95
effectiveFunction · 0.85
strFunction · 0.85

Tested by

no test coverage detected