code: def trace_debug_dispatch(self, frame, event, arg):
          
          trace_log.info(
              'Frame:%s. Event: %s. Arg: %r' % (pretty_frame(frame), event, arg)
          )
          trace_log.debug(
              'state %r breaks ? %s stops ? %s' % (
                  self.state, self.breaks(frame, no_remove=True),
                  self.state.stops(frame, event)
              )
          )
          if event == 'return':
              trace_log.debug(
                  'Return: frame: %s, state: %s, state.f_back: %s' % (
                      pretty_frame(frame), pretty_frame(self.state.frame),
                      pretty_frame(self.state.frame.f_back)
                  )
              )
          if self.trace_dispatch(frame, event, arg):
              return self.trace_debug_dispatch
          trace_log.debug("No trace %s" % pretty_frame(frame))
docs: Utility function to add debug to tracing