Skip to content

Commit

Permalink
Update views after examining breakpoint
Browse files Browse the repository at this point in the history
Makes sure that enabled state is immediately reflected accurately in
both source and breakpoint views.
  • Loading branch information
mvanderkamp authored and inducer committed Sep 3, 2021
1 parent 0432e98 commit e389d24
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pudb/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -1194,13 +1194,13 @@ def handle_delete_breakpoint(w, size, key):
delete_breakpoint(bp)

def delete_breakpoint(bp):
bp.enabled = False
set_breakpoint_source(bp)
err = self.debugger.clear_break(bp.file, bp.line)
if err:
self.message("Error clearing breakpoint:\n" + err)
else:
bp.enabled = False
self.update_breakpoints()
set_breakpoint_source(bp)

def enable_disable_breakpoint(w, size, key):
bp_entry, pos = self.bp_list._w.get_focus()
Expand Down Expand Up @@ -1266,6 +1266,9 @@ def examine_breakpoint(w, size, key):
elif result == "del":
delete_breakpoint(bp)

self.update_breakpoints()
set_breakpoint_source(bp)

def show_breakpoint(w, size, key):
bp_entry, pos = self.bp_list._w.get_focus()

Expand Down

0 comments on commit e389d24

Please sign in to comment.