549 Public method reimplemented to handle the program about to execute a |
549 Public method reimplemented to handle the program about to execute a |
550 particular line. |
550 particular line. |
551 |
551 |
552 @param frame the frame object |
552 @param frame the frame object |
553 """ |
553 """ |
554 line = frame.f_lineno |
|
555 |
|
556 # We never stop on line 0. |
554 # We never stop on line 0. |
557 if line == 0: |
555 if frame.f_lineno == 0: |
558 return |
556 return |
559 |
557 |
560 # See if we are skipping at the start of a newly loaded program. |
558 # See if we are skipping at the start of a newly loaded program. |
|
559 # Then get the complete frame stack without eric or Python supplied |
|
560 # libraries |
561 if self._dbgClient.mainFrame is None: |
561 if self._dbgClient.mainFrame is None: |
562 fr = frame |
562 fr = frame |
563 while (fr is not None and |
563 while (fr is not None and |
564 fr.f_code != self._dbgClient.handleLine.func_code): |
564 fr.f_code != self._dbgClient.handleLine.func_code): |
|
565 if (fr.f_code.co_filename == '<string>' or |
|
566 os.path.dirname(fr.f_code.co_filename) == self.lib): |
|
567 break |
|
568 |
565 self._dbgClient.mainFrame = fr |
569 self._dbgClient.mainFrame = fr |
566 fr = fr.f_back |
570 fr = fr.f_back |
567 |
571 |
568 self.currentFrame = frame |
572 self.currentFrame = frame |
569 |
573 |