DebugClients/Python/DebugBase.py

branch
debugger fine grinding
changeset 5573
4f85c1de060d
parent 5560
597164ed39b7
child 5582
d829281d439f
--- a/DebugClients/Python/DebugBase.py	Tue Feb 28 19:11:33 2017 +0100
+++ b/DebugClients/Python/DebugBase.py	Thu Mar 02 22:18:17 2017 +0100
@@ -307,7 +307,12 @@
         
         if event == 'line':
             if self.stop_here(frame) or self.break_here(frame):
-                self.user_line(frame)
+                if (self.stop_everywhere and
+                        frame.f_back.f_code.co_name == "prepareJsonCommand"):
+                    # Just stepped into print statement, so skip these frames
+                    self._set_stopinfo(None, frame.f_back)
+                else:
+                    self.user_line(frame)
             return self.trace_dispatch
         
         if event == 'call':
@@ -320,6 +325,10 @@
                 return
         
         if event == 'return':
+            if frame == self.returnframe:
+                # Only true if we didn't stopped in this frame, because it's
+                # belonging to the eric debugger.
+                self._set_stopinfo(None, frame.f_back)
             return
         
         if event == 'exception':
@@ -469,6 +478,9 @@
         """
         self.stopframe = stopframe
         self.returnframe = returnframe
+        if returnframe is not None:
+            # Ensure to be able to stop on the return frame
+            returnframe.f_trace = self.trace_dispatch
         self.stop_everywhere = False
 
     def set_continue(self, special):
@@ -502,7 +514,6 @@
         @type frame object
         """
         self._set_stopinfo(frame, frame.f_back)
-        frame.f_back.f_trace = self.trace_dispatch
         frame.f_trace = self.trace_dispatch
 
     def set_return(self, frame):

eric ide

mercurial