Fix for PyPy showing no local variables and suppress exception on old frames.

Sun, 23 Oct 2016 23:12:49 +0200

author
T.Rzepka <Tobias.Rzepka@gmail.com>
date
Sun, 23 Oct 2016 23:12:49 +0200
changeset 5269
0e96e1557c45
parent 5265
787d87769425
child 5271
ac9d134b457a

Fix for PyPy showing no local variables and suppress exception on old frames.

DebugClients/Python/ThreadExtension.py file | annotate | diff | comparison | revisions
Debugger/DebuggerInterfacePython2.py file | annotate | diff | comparison | revisions
Debugger/DebuggerInterfacePython3.py file | annotate | diff | comparison | revisions
--- a/DebugClients/Python/ThreadExtension.py	Sat Oct 22 18:35:10 2016 +0200
+++ b/DebugClients/Python/ThreadExtension.py	Sun Oct 23 23:12:49 2016 +0200
@@ -233,7 +233,8 @@
                 self.threads[id] = newThread
             
             # adjust current frame
-            self.threads[id].currentFrame = self.getExecutedFrame(frame)
+            if "__pypy__" not in sys.builtin_module_names:
+                self.threads[id].currentFrame = self.getExecutedFrame(frame)
         
         # Clean up obsolet because terminated threads
         self.threads = {id_: thrd for id_, thrd in self.threads.items()
--- a/Debugger/DebuggerInterfacePython2.py	Sat Oct 22 18:35:10 2016 +0200
+++ b/Debugger/DebuggerInterfacePython2.py	Sun Oct 23 23:12:49 2016 +0200
@@ -869,6 +869,11 @@
             self.debugServer.signalClientOutput(params["text"])
         
         elif method in ["ResponseLine", "ResponseStack"]:
+            # Check if obsolet thread was clicked
+            if params["stack"] == []:
+                # Request updated list
+                self.remoteThreadList()
+                return
             for s in params["stack"]:
                 s[0] = self.translate(s[0], True)
             cf = params["stack"][0]
--- a/Debugger/DebuggerInterfacePython3.py	Sat Oct 22 18:35:10 2016 +0200
+++ b/Debugger/DebuggerInterfacePython3.py	Sun Oct 23 23:12:49 2016 +0200
@@ -869,6 +869,11 @@
             self.debugServer.signalClientOutput(params["text"])
         
         elif method in ["ResponseLine", "ResponseStack"]:
+            # Check if obsolet thread was clicked
+            if params["stack"] == []:
+                # Request updated list
+                self.remoteThreadList()
+                return
             for s in params["stack"]:
                 s[0] = self.translate(s[0], True)
             cf = params["stack"][0]

eric ide

mercurial