Wed, 03 Aug 2016 21:41:40 +0200
Bdb.clear_all_breaks doesn't work anymore. BreakpointWatch improved.
--- a/DebugClients/Python/BreakpointWatch.py Sun Jul 24 21:34:54 2016 +0200 +++ b/DebugClients/Python/BreakpointWatch.py Wed Aug 03 21:41:40 2016 +0200 @@ -94,7 +94,16 @@ if bp: bp.deleteMe() Breakpoint.breakInFrameCache.clear() - + + @staticmethod + def clear_all_breaks(): + """ + Public method to clear all breakpoints. + """ + for bp in Breakpoint.breaks.copy(): + bp.deleteMe() + Breakpoint.breakInFrameCache.clear() + @staticmethod def get_break(filename, lineno): """ @@ -250,6 +259,13 @@ pass @staticmethod + def clear_all_watches(): + """ + Public method to clear all watch expressions. + """ + del Watch.watches[:] + + @staticmethod def get_watch(cond): """ Public method to get a watch expression.
--- a/DebugClients/Python/DebugClientBase.py Sun Jul 24 21:34:54 2016 +0200 +++ b/DebugClients/Python/DebugClientBase.py Wed Aug 03 21:41:40 2016 +0200 @@ -522,7 +522,8 @@ # clear all old breakpoints, they'll get set after we have # started - self.mainThread.clear_all_breaks() + Breakpoint.clear_all_breaks() + Watch.clear_all_watches() self.mainThread.tracePythonLibs(int(tracePython))
--- a/DebugClients/Python3/BreakpointWatch.py Sun Jul 24 21:34:54 2016 +0200 +++ b/DebugClients/Python3/BreakpointWatch.py Wed Aug 03 21:41:40 2016 +0200 @@ -96,6 +96,15 @@ Breakpoint.breakInFrameCache.clear() @staticmethod + def clear_all_breaks(): + """ + Public method to clear all breakpoints. + """ + for bp in Breakpoint.breaks.copy(): + bp.deleteMe() + Breakpoint.breakInFrameCache.clear() + + @staticmethod def get_break(filename, lineno): """ Public method to get the breakpoint of a particular line. @@ -250,6 +259,13 @@ pass @staticmethod + def clear_all_watches(): + """ + Public method to clear all watch expressions. + """ + del Watch.watches[:] + + @staticmethod def get_watch(cond): """ Public method to get a watch expression.
--- a/DebugClients/Python3/DebugClientBase.py Sun Jul 24 21:34:54 2016 +0200 +++ b/DebugClients/Python3/DebugClientBase.py Wed Aug 03 21:41:40 2016 +0200 @@ -515,7 +515,8 @@ # clear all old breakpoints, they'll get set after we have # started - self.mainThread.clear_all_breaks() + Breakpoint.clear_all_breaks() + Watch.clear_all_watches() self.mainThread.tracePythonLibs(int(tracePython))