--- a/DebugClients/Python/DebugBase.py Sun Jul 24 20:59:57 2016 +0200 +++ b/DebugClients/Python/DebugBase.py Sun Jul 24 21:13:03 2016 +0200 @@ -551,17 +551,21 @@ @param frame the frame object """ - line = frame.f_lineno - # We never stop on line 0. - if line == 0: + if frame.f_lineno == 0: return # See if we are skipping at the start of a newly loaded program. + # Then get the complete frame stack without eric or Python supplied + # libraries if self._dbgClient.mainFrame is None: fr = frame while (fr is not None and fr.f_code != self._dbgClient.handleLine.func_code): + if (fr.f_code.co_filename == '<string>' or + os.path.dirname(fr.f_code.co_filename) == self.lib): + break + self._dbgClient.mainFrame = fr fr = fr.f_back