Debug a single function call. Return the result of the function call.
(self, func, /, *args, **kwds)
| 936 | # This method is more useful to debug a single function call. |
| 937 | |
| 938 | def runcall(self, func, /, *args, **kwds): |
| 939 | """Debug a single function call. |
| 940 | |
| 941 | Return the result of the function call. |
| 942 | """ |
| 943 | self.reset() |
| 944 | self.start_trace() |
| 945 | res = None |
| 946 | try: |
| 947 | res = func(*args, **kwds) |
| 948 | except BdbQuit: |
| 949 | pass |
| 950 | finally: |
| 951 | self.quitting = True |
| 952 | self.stop_trace() |
| 953 | return res |
| 954 | |
| 955 | |
| 956 | def set_trace(): |
no test coverage detected