Permalink
Browse files

Merge branch 'master' of github.com:inducer/pudb

  • Loading branch information...
2 parents 2d28b9f + 2f838f7 commit 74a0d9c1ed274615e320051d41e9b3013b168ef9 @inducer 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 74a0d9c

Please sign in to comment.