58 |
59 |
59 def deleteMe(self): |
60 def deleteMe(self): |
60 """ |
61 """ |
61 Public method to clear this breakpoint. |
62 Public method to clear this breakpoint. |
62 """ |
63 """ |
63 try: |
64 with contextlib.suppress(KeyError): |
64 del Breakpoint.breaks[(self.file, self.line)] |
65 del Breakpoint.breaks[(self.file, self.line)] |
65 Breakpoint.breakInFile[self.file].remove(self.line) |
66 Breakpoint.breakInFile[self.file].remove(self.line) |
66 if not Breakpoint.breakInFile[self.file]: |
67 if not Breakpoint.breakInFile[self.file]: |
67 del Breakpoint.breakInFile[self.file] |
68 del Breakpoint.breakInFile[self.file] |
68 except KeyError: |
|
69 pass |
|
70 |
69 |
71 def enable(self): |
70 def enable(self): |
72 """ |
71 """ |
73 Public method to enable this breakpoint. |
72 Public method to enable this breakpoint. |
74 """ |
73 """ |
249 Static method to clear a watch expression. |
246 Static method to clear a watch expression. |
250 |
247 |
251 @param cond expression of the watch expression to be cleared |
248 @param cond expression of the watch expression to be cleared |
252 @type str |
249 @type str |
253 """ |
250 """ |
254 try: |
251 with contextlib.suppress(ValueError): |
255 Watch.watches.remove(Watch.get_watch(cond)) |
252 Watch.watches.remove(Watch.get_watch(cond)) |
256 except ValueError: |
|
257 pass |
|
258 |
253 |
259 @staticmethod |
254 @staticmethod |
260 def clear_all_watches(): |
255 def clear_all_watches(): |
261 """ |
256 """ |
262 Static method to clear all watch expressions. |
257 Static method to clear all watch expressions. |