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

Method dispatch_line

Lib/bdb.py:295–313  ·  view source on GitHub ↗

Invoke user function and return trace function for line event. If the debugger stops on the current line, invoke self.user_line(). Raise BdbQuit if self.quitting is set. Return self.trace_dispatch to continue tracing in this scope.

(self, frame)

Source from the content-addressed store, hash-verified

293 return self.trace_dispatch
294
295 def dispatch_line(self, frame):
296 """Invoke user function and return trace function for line event.
297
298 If the debugger stops on the current line, invoke
299 self.user_line(). Raise BdbQuit if self.quitting is set.
300 Return self.trace_dispatch to continue tracing in this scope.
301 """
302 # GH-136057
303 # For line events, we don't want to stop at the same line where
304 # the latest next/step command was issued.
305 if (self.stop_here(frame) or self.break_here(frame)) and not (
306 self.cmdframe == frame and self.cmdlineno == frame.f_lineno
307 ):
308 self.user_line(frame)
309 self.restart_events()
310 if self.quitting: raise BdbQuit
311 elif not self.get_break(frame.f_code.co_filename, frame.f_lineno):
312 self.disable_current_event()
313 return self.trace_dispatch
314
315 def dispatch_call(self, frame, arg):
316 """Invoke user function and return trace function for call event.

Callers 1

trace_dispatchMethod · 0.95

Calls 6

stop_hereMethod · 0.95
break_hereMethod · 0.95
user_lineMethod · 0.95
restart_eventsMethod · 0.95
get_breakMethod · 0.95
disable_current_eventMethod · 0.95

Tested by

no test coverage detected