Tue, 07 Mar 2017 18:25:42 +0100
Merged with more debugger changes done by Tobias.
--- a/DebugClients/Python/DebugBase.py Tue Mar 07 18:25:05 2017 +0100 +++ b/DebugClients/Python/DebugBase.py Tue Mar 07 18:25:42 2017 +0100 @@ -752,10 +752,10 @@ if frame.f_lineno == 0: return + self.isBroken = True self.currentFrame = frame stack = self.getStack(frame, applyTrace=True) - self.isBroken = True self._dbgClient.lockClient() self._dbgClient.currentThread = self self._dbgClient.currentThreadExec = self @@ -848,16 +848,20 @@ else: excvaltxt = str(excval) + # Don't step into libraries, which are used by our debugger methods + if exctb is not None: + self.stop_everywhere = False + + self.isBroken = True + stack = [] if exctb: frlist = self.__extract_stack(exctb) frlist.reverse() self.currentFrame = frlist[0] - stack = self.getStack(frlist[self.skipFrames:]) - self.isBroken = True self._dbgClient.lockClient() self._dbgClient.currentThread = self self._dbgClient.currentThreadExec = self @@ -872,8 +876,11 @@ self.skipFrames = 0 self.isBroken = False + stop_everywhere = self.stop_everywhere + self.stop_everywhere = False self.eventPollFlag = False self._dbgClient.unlockClient() + self.stop_everywhere = stop_everywhere def __extractExceptionName(self, exctype): """ @@ -986,7 +993,7 @@ "dist-packages")) and not x.startswith(self.lib)] pathsToSkip.extend(localLib) - self.pathsToSkip = tuple(pathsToSkip) + self.pathsToSkip = tuple(set(pathsToSkip)) def __skipFrame(self, frame): """
--- a/DebugClients/Python/ThreadExtension.py Tue Mar 07 18:25:05 2017 +0100 +++ b/DebugClients/Python/ThreadExtension.py Tue Mar 07 18:25:42 2017 +0100 @@ -203,8 +203,8 @@ while frame is not None: baseName = os.path.basename(frame.f_code.co_filename) if not baseName.startswith( - ('DebugClientBase.py', 'DebugBase.py', 'AsyncIO.py', - 'ThreadExtension.py', 'threading.py')): + ('DebugClientBase.py', 'DebugBase.py', 'AsyncFile.py', + 'ThreadExtension.py')): break frame = frame.f_back @@ -234,7 +234,8 @@ if "__pypy__" not in sys.builtin_module_names: # Don't update with None currentFrame = self.getExecutedFrame(frame) - if currentFrame is not None: + if (currentFrame is not None and + self.threads[id].isBroken is False): self.threads[id].currentFrame = currentFrame # Clean up obsolet because terminated threads