Merged with debugger changes done by Tobias.

Sun, 26 Feb 2017 15:57:02 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 26 Feb 2017 15:57:02 +0100
changeset 5567
f68d74cd8210
parent 5564
d670b282b5b5 (current diff)
parent 5561
5fffb5cc1a88 (diff)
child 5568
7e782eccc5af
child 5571
2e4084a51721

Merged with debugger changes done by Tobias.

--- a/DebugClients/Python/DebugBase.py	Sun Feb 26 15:54:49 2017 +0100
+++ b/DebugClients/Python/DebugBase.py	Sun Feb 26 15:57:02 2017 +0100
@@ -846,14 +846,24 @@
             
             stack = self.getStack(frlist[self.skipFrames:])
         
+        self.isBroken = True
+        self._dbgClient.lockClient()
+        self._dbgClient.currentThread = self
+        self._dbgClient.currentThreadExec = self
         self._dbgClient.sendException(exctypetxt, excvaltxt, stack)
+        self._dbgClient.dumpThreadList()
         
-        if exctb is None:
-            return
+        if exctb is not None:
+            # When polling kept enabled, it isn't possible to resume after an
+            # unhandled exception without further user interaction.
+            self._dbgClient.eventLoop(True)
         
-        self._dbgClient.eventLoop()
         self.skipFrames = 0
         
+        self.isBroken = False
+        self.eventPollFlag = False
+        self._dbgClient.unlockClient()
+    
     def __extractExceptionName(self, exctype):
         """
         Private method to extract the exception name given the exception
--- a/DebugClients/Python/ThreadExtension.py	Sun Feb 26 15:54:49 2017 +0100
+++ b/DebugClients/Python/ThreadExtension.py	Sun Feb 26 15:57:02 2017 +0100
@@ -232,7 +232,10 @@
             
             # adjust current frame
             if "__pypy__" not in sys.builtin_module_names:
-                self.threads[id].currentFrame = self.getExecutedFrame(frame)
+                # Don't update with None
+                currentFrame = self.getExecutedFrame(frame)
+                if currentFrame is not None:
+                    self.threads[id].currentFrame = currentFrame
         
         # Clean up obsolet because terminated threads
         self.threads = {id_: thrd for id_, thrd in self.threads.items()
--- a/changelog	Sun Feb 26 15:54:49 2017 +0100
+++ b/changelog	Sun Feb 26 15:57:02 2017 +0100
@@ -9,6 +9,7 @@
   -- catch unhandled exceptions again
   -- support for PySide2 added
   -- atexit handling works as specified in any condition
+  -- prevent ordinary breakpoints to steal the focus from an exception
 - Mercurial Interface
   -- improved the log browser in several ways
   -- improved the status dialog

eric ide

mercurial