Permalink
Browse files

add the capability to enable/disable a breakpoint with the 'e' charac…

…ter in the Breakpoint view
  • Loading branch information...
1 parent 407b491 commit 8830eba3a5366860c403e642654504dc54253d8d @matrixise matrixise committed Feb 18, 2014
Showing with 13 additions and 0 deletions.
  1. +13 −0 pudb/debugger.py
View
@@ -109,6 +109,7 @@ def newfunc(*fargs, **fkeywords):
enter - edit breakpoint
d - delete breakpoint
+ e - enable/disable breakpoint
License:
--------
@@ -893,6 +894,17 @@ def delete_breakpoint(w, size, key):
else:
self.update_breakpoints()
+ def enable_disable_breakpoint(w, size, key):
+ bp_entry, pos = self.bp_list._w.get_focus()
+
+ if bp_entry is None:
+ return
+
+ bp = self._get_bp_list()[pos]
+ bp.enabled = not bp.enabled
+
+ self.update_breakpoints()
+
def examine_breakpoint(w, size, key):
bp_entry, pos = self.bp_list._w.get_focus()
@@ -967,6 +979,7 @@ def examine_breakpoint(w, size, key):
self.bp_list.listen("enter", examine_breakpoint)
self.bp_list.listen("d", delete_breakpoint)
self.bp_list.listen("s", save_breakpoints)
+ self.bp_list.listen("e", enable_disable_breakpoint)
self.bp_list.listen("[", partial(change_rhs_box, 'breakpoints', 2, -1))
self.bp_list.listen("]", partial(change_rhs_box, 'breakpoints', 2, 1))

0 comments on commit 8830eba

Please sign in to comment.