Merged with more debugger changes done by Tobias.

Fri, 03 Mar 2017 18:16:52 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 03 Mar 2017 18:16:52 +0100
changeset 5574
bc56ec8d6f44
parent 5572
c6eec77019d2 (current diff)
parent 5573
4f85c1de060d (diff)
child 5575
835f789ded71

Merged with more debugger changes done by Tobias.

diff -r c6eec77019d2 -r bc56ec8d6f44 DebugClients/Python/DebugBase.py
--- a/DebugClients/Python/DebugBase.py	Tue Feb 28 19:11:33 2017 +0100
+++ b/DebugClients/Python/DebugBase.py	Fri Mar 03 18:16:52 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):
diff -r c6eec77019d2 -r bc56ec8d6f44 changelog
--- a/changelog	Tue Feb 28 19:11:33 2017 +0100
+++ b/changelog	Fri Mar 03 18:16:52 2017 +0100
@@ -6,6 +6,8 @@
   -- upgraded pycodestyle to version 2.3.1
   -- upgraded pyflakes to version 1.5.0
 - Debugger
+  -- prevent stepping into print statements if checkbox for debugging into
+     interpreter libraries is checked
   -- catch unhandled exceptions again
   -- support for PySide2 added
   -- atexit handling works as specified in any condition

eric ide

mercurial