Fixed stop at sys.breakpoint() in run mode under Python3 and on first run (Py2 and 3).

Tue, 17 Jun 2014 21:09:24 +0200

author
T.Rzepka <Tobias.Rzepka@gmail.com>
date
Tue, 17 Jun 2014 21:09:24 +0200
changeset 3640
2bf828881e86
parent 3638
cede64100e13
child 3642
1a6f8d9b63a5

Fixed stop at sys.breakpoint() in run mode under Python3 and on first run (Py2 and 3).

DebugClients/Python3/DebugBase.py file | annotate | diff | comparison | revisions
DebugClients/Python3/DebugClientBase.py file | annotate | diff | comparison | revisions
Debugger/DebuggerInterfacePython.py file | annotate | diff | comparison | revisions
Debugger/DebuggerInterfacePython3.py file | annotate | diff | comparison | revisions
--- a/DebugClients/Python3/DebugBase.py	Tue Jun 17 19:46:24 2014 +0200
+++ b/DebugClients/Python3/DebugBase.py	Tue Jun 17 21:09:24 2014 +0200
@@ -808,7 +808,7 @@
 
         # Eliminate things like <string> and <stdin>.
         if fn[0] == '<':
-            return 1
+            return True
 
         #XXX - think of a better way to do this.  It's only a convience for
         #debugging the debugger - when the debugger code is in the current
--- a/DebugClients/Python3/DebugClientBase.py	Tue Jun 17 19:46:24 2014 +0200
+++ b/DebugClients/Python3/DebugClientBase.py	Tue Jun 17 21:09:24 2014 +0200
@@ -559,14 +559,15 @@
                 self.debugMod.__dict__['__file__'] = sys.argv[0]
                 sys.modules['__main__'] = self.debugMod
                 res = 0
-                try:
-                    exec(open(sys.argv[0], encoding=self.__coding).read(),
-                         self.debugMod.__dict__)
-                except SystemExit as exc:
-                    res = exc.code
-                    atexit._run_exitfuncs()
-                self.writestream.flush()
-                self.progTerminated(res)
+                code = self.__compileFileSource(self.running)
+                if code:
+                    try:
+                        exec(code, self.debugMod.__dict__)
+                    except SystemExit as exc:
+                        res = exc.code
+                        atexit._run_exitfuncs()
+                    self.writestream.flush()
+                    self.progTerminated(res)
                 return
 
             if cmd == DebugProtocol.RequestProfile:
--- a/Debugger/DebuggerInterfacePython.py	Tue Jun 17 19:46:24 2014 +0200
+++ b/Debugger/DebuggerInterfacePython.py	Tue Jun 17 21:09:24 2014 +0200
@@ -65,7 +65,7 @@
         super(DebuggerInterfacePython, self).__init__()
         
         self.__isNetworked = True
-        self.__autoContinue = not passive
+        self.__autoContinue = False
         
         self.debugServer = debugServer
         self.passive = passive
--- a/Debugger/DebuggerInterfacePython3.py	Tue Jun 17 19:46:24 2014 +0200
+++ b/Debugger/DebuggerInterfacePython3.py	Tue Jun 17 21:09:24 2014 +0200
@@ -64,7 +64,7 @@
         super(DebuggerInterfacePython3, self).__init__()
         
         self.__isNetworked = True
-        self.__autoContinue = not passive
+        self.__autoContinue = False
         
         self.debugServer = debugServer
         self.passive = passive

eric ide

mercurial