--- bdb.py 2009-11-24 17:38:20.000000000 +0530 +++ bdbp.py 2009-11-24 17:05:15.000000000 +0530 @@ -98,7 +98,10 @@ # (CT) stopframe may now also be None, see dispatch_call. # (CT) the former test for None is therefore removed from here. if frame is self.stopframe: - return frame.f_lineno >= self.stoplineno + if self.stopframe is self.botframe and self.stoplineno == -1: + return False + else: + return frame.f_lineno >= self.stoplineno while frame is not None and frame is not self.stopframe: if frame is self.botframe: return True @@ -175,7 +178,7 @@ def set_next(self, frame): """Stop on the next line in or below the given frame.""" - self._set_stopinfo(frame, None) + self._set_stopinfo(frame, None, frame.f_lineno + 1) def set_return(self, frame): """Stop when returning from the given frame."""