Just like pdb.set_trace(), a helper function that creates a debugger instance and sets the trace.
()
| 38 | |
| 39 | |
| 40 | def set_trace(): |
| 41 | """Just like pdb.set_trace(), a helper function that creates |
| 42 | a debugger instance and sets the trace.""" |
| 43 | debugger = BPdb() |
| 44 | debugger.set_trace(sys._getframe().f_back) |
| 45 | |
| 46 | |
| 47 | # Adopted verbatim from pdb for completeness: |