'Start debugging from `frame`.
If frame is not specified, debugging starts from caller\'s frame.'

def set_trace(self, frame=None):

    if (frame is None):
        frame = sys._getframe().f_back
    self.reset()
    while frame:
        frame.f_trace = self.trace_dispatch
        self.botframe = frame
        frame = frame.f_back
    self.set_step()
    sys.settrace(self.trace_dispatch)
