Debug a single function call. Return the result of the function call.
(self, func, /, *args, **kwds)
| 632 | # This method is more useful to debug a single function call. |
| 633 | |
| 634 | def runcall(self, func, /, *args, **kwds): |
| 635 | """Debug a single function call. |
| 636 | |
| 637 | Return the result of the function call. |
| 638 | """ |
| 639 | self.reset() |
| 640 | sys.settrace(self.trace_dispatch) |
| 641 | res = None |
| 642 | try: |
| 643 | res = func(*args, **kwds) |
| 644 | except BdbQuit: |
| 645 | pass |
| 646 | finally: |
| 647 | self.quitting = True |
| 648 | sys.settrace(None) |
| 649 | return res |
| 650 | |
| 651 | |
| 652 | def set_trace(): |