Debug a single function call. Return the result of the function call.
(self, func, /, *args, **kwds)
| 945 | # This method is more useful to debug a single function call. |
| 946 | |
| 947 | def runcall(self, func, /, *args, **kwds): |
| 948 | """Debug a single function call. |
| 949 | |
| 950 | Return the result of the function call. |
| 951 | """ |
| 952 | self.reset() |
| 953 | self.start_trace() |
| 954 | res = None |
| 955 | try: |
| 956 | res = func(*args, **kwds) |
| 957 | except BdbQuit: |
| 958 | pass |
| 959 | finally: |
| 960 | self.quitting = True |
| 961 | self.stop_trace() |
| 962 | return res |
| 963 | |
| 964 | |
| 965 | def set_trace(): |