Invoke user function and return trace function for return event. If the debugger stops on this function return, invoke self.user_return(). Raise BdbQuit if self.quitting is set. Return self.trace_dispatch to continue tracing in this scope.
(self, frame, arg)
| 341 | return self.trace_dispatch |
| 342 | |
| 343 | def dispatch_return(self, frame, arg): |
| 344 | """Invoke user function and return trace function for return event. |
| 345 | |
| 346 | If the debugger stops on this function return, invoke |
| 347 | self.user_return(). Raise BdbQuit if self.quitting is set. |
| 348 | Return self.trace_dispatch to continue tracing in this scope. |
| 349 | """ |
| 350 | if self.stop_here(frame) or frame == self.returnframe: |
| 351 | # Ignore return events in generator except when stepping. |
| 352 | if self.stopframe and frame.f_code.co_flags & GENERATOR_AND_COROUTINE_FLAGS: |
| 353 | # It's possible to trigger a StopIteration exception in |
| 354 | # the caller so we must set the trace function in the caller |
| 355 | self._set_caller_tracefunc(frame) |
| 356 | return self.trace_dispatch |
| 357 | try: |
| 358 | self.frame_returning = frame |
| 359 | self.user_return(frame, arg) |
| 360 | self.restart_events() |
| 361 | finally: |
| 362 | self.frame_returning = None |
| 363 | if self.quitting: raise BdbQuit |
| 364 | # The user issued a 'next' or 'until' command. |
| 365 | if self.stopframe is frame and self.stoplineno != -1: |
| 366 | self._set_stopinfo(None, None) |
| 367 | # The previous frame might not have f_trace set, unless we are |
| 368 | # issuing a command that does not expect to stop, we should set |
| 369 | # f_trace |
| 370 | if self.stoplineno != -1: |
| 371 | self._set_caller_tracefunc(frame) |
| 372 | return self.trace_dispatch |
| 373 | |
| 374 | def dispatch_exception(self, frame, arg): |
| 375 | """Invoke user function and return trace function for exception event. |
no test coverage detected