(self, f, tb)
| 513 | self.tb_lineno.clear() |
| 514 | |
| 515 | def setup(self, f, tb): |
| 516 | self.forget() |
| 517 | self.stack, self.curindex = self.get_stack(f, tb) |
| 518 | while tb: |
| 519 | # when setting up post-mortem debugging with a traceback, save all |
| 520 | # the original line numbers to be displayed along the current line |
| 521 | # numbers (which can be different, e.g. due to finally clauses) |
| 522 | lineno = lasti2lineno(tb.tb_frame.f_code, tb.tb_lasti) |
| 523 | self.tb_lineno[tb.tb_frame] = lineno |
| 524 | tb = tb.tb_next |
| 525 | self.curframe = self.stack[self.curindex][0] |
| 526 | self.set_convenience_variable(self.curframe, '_frame', self.curframe) |
| 527 | if self._current_task: |
| 528 | self.set_convenience_variable(self.curframe, '_asynctask', self._current_task) |
| 529 | self._save_initial_file_mtime(self.curframe) |
| 530 | |
| 531 | if self._chained_exceptions: |
| 532 | self.set_convenience_variable( |
| 533 | self.curframe, |
| 534 | '_exception', |
| 535 | self._chained_exceptions[self._chained_exception_index], |
| 536 | ) |
| 537 | |
| 538 | if self.rcLines: |
| 539 | self.cmdqueue = [ |
| 540 | line for line in self.rcLines |
| 541 | if line.strip() and not line.strip().startswith("#") |
| 542 | ] |
| 543 | self.rcLines = [] |
| 544 | |
| 545 | @property |
| 546 | @deprecated("The frame locals reference is no longer cached. Use 'curframe.f_locals' instead.") |
no test coverage detected