| 554 | self._set_trace_opcodes(opcode) |
| 555 | |
| 556 | def _set_caller_tracefunc(self, current_frame): |
| 557 | # Issue #13183: pdb skips frames after hitting a breakpoint and running |
| 558 | # step commands. |
| 559 | # Restore the trace function in the caller (that may not have been set |
| 560 | # for performance reasons) when returning from the current frame, unless |
| 561 | # the caller is the botframe. |
| 562 | caller_frame = current_frame.f_back |
| 563 | if caller_frame and not caller_frame.f_trace and caller_frame is not self.botframe: |
| 564 | caller_frame.f_trace = self.trace_dispatch |
| 565 | |
| 566 | # Derived classes and clients can call the following methods |
| 567 | # to affect the stepping state. |