--- a/DebugClients/Python/DebugBase.py Sun Jul 24 21:13:03 2016 +0200 +++ b/DebugClients/Python/DebugBase.py Sun Jul 24 21:34:54 2016 +0200 @@ -342,12 +342,28 @@ def set_trace(self, frame=None): """ - Public method reimplemented from bdb.py to do some special setup. + Public method to start debugging from 'frame'. + + If frame is not specified, debugging starts from caller's frame. @param frame frame to start debugging from + @type frame object """ - bdb.Bdb.set_trace(self, frame) - sys.setprofile(self.profile) + if frame is None: + frame = sys._getframe().f_back + + # stop at erics debugger frame + while frame: + if not self.__skipFrame(frame): + frame.f_trace = self.trace_dispatch + frame = frame.f_back + self.botframe = frame + if self.__skipFrame(frame): + break + + self.set_step() + sys.settrace(self.trace_dispatch) + sys.setprofile(self._dbgClient.callTraceEnabled) def set_continue(self, special): """ @@ -359,9 +375,11 @@ # Modified version of the one found in bdb.py # Here we only set a new stop frame if it is a normal continue. if not special: - self.stopframe = self.botframe - self.returnframe = None - self.quitting = 0 + self._set_stopinfo(self.botframe, None) + # Disable tracing if not started in debug mode + if not self._dbgClient.debugging: + sys.settrace(None) + sys.setprofile(None) def set_quit(self): """