DebugClients/Python/DebugBase.py

branch
debugger speed
changeset 5205
df1709f0e49f
parent 5204
7376ae3e6668
child 5206
997064ba25d6
diff -r 7376ae3e6668 -r df1709f0e49f DebugClients/Python/DebugBase.py
--- a/DebugClients/Python/DebugBase.py	Tue Oct 04 21:25:15 2016 +0200
+++ b/DebugClients/Python/DebugBase.py	Tue Oct 04 21:45:33 2016 +0200
@@ -316,9 +316,8 @@
         
         if event == 'call':
             if self.botframe is None and frame.f_lineno > 1:
-                self.botframe = frame.f_back
+                self.botframe = frame
                 frame.f_trace = self.trace_dispatch
-                self._dbgClient.mainFrame = frame
                 
                 self.user_line(frame)
                 return self.trace_dispatch
@@ -331,12 +330,12 @@
             return self.trace_dispatch
         
         if event == 'return':
-            if self.stop_here(frame):
+            if self.stop_here(frame) or frame == self.botframe:
                 # Ignore return events in generator except when stepping.
                 if self.stopframe and frame.f_code.co_flags & CO_GENERATOR:
                     return
                 # The program has finished if we have just left the first frame
-                if (frame == self._dbgClient.mainFrame and
+                if (frame == self.botframe and
                         self._mainThread):
                     atexit._run_exitfuncs()
                     self._dbgClient.progTerminated(arg)
@@ -396,7 +395,6 @@
             if frame.f_back.f_code == self.stopOnHandleLine:
                 frame.f_trace = self.trace_dispatch
                 self.botframe = frame
-                self._dbgClient.mainFrame = frame
                 break
             
             frame = frame.f_back
@@ -457,7 +455,7 @@
         """
         # Here we only set a new stop frame if it is a normal continue.
         if not special:
-            self._set_stopinfo(self.botframe, None)
+            self._set_stopinfo(None, None)
         
         # Disable tracing if not started in debug mode
         if not self._dbgClient.debugging:
@@ -909,8 +907,7 @@
         
         return (self.stop_everywhere or
                 frame is self.stopframe or
-                frame is self.returnframe or
-                frame is self.botframe)
+                frame is self.returnframe)
 
     def tracePythonLibs(self, enable):
         """

eric ide

mercurial