Skip to content

Commit 99a32b6

Browse files
authored
Merge branch 'inducer:main' into fix-post-mortem-variable-crash
2 parents 6bfd17b + d9bed31 commit 99a32b6

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

pudb/debugger.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@
115115
m - toggle method visibility
116116
w - toggle line wrapping
117117
n/insert - add new watch expression
118-
e - edit options (also to delete)
118+
delete - remove watch expression
119+
e - edit options
119120
120121
Keys in stack list:
121122
enter - jump to frame
@@ -939,6 +940,11 @@ def change_var_state(w, size, key):
939940
iinfo.wrap = not iinfo.wrap
940941
elif key == "m":
941942
iinfo.show_methods = not iinfo.show_methods
943+
elif key == "delete":
944+
fvi = self.get_frame_var_info(read_only=False)
945+
for i, watch_expr in enumerate(fvi.watches):
946+
if watch_expr is var.watch_expr:
947+
del fvi.watches[i]
942948

943949
self.update_var_view(focus_index=focus_index)
944950

@@ -1096,6 +1102,7 @@ def insert_watch(w, size, key):
10961102
self.var_list.listen("e", edit_inspector_detail)
10971103
self.var_list.listen("n", insert_watch)
10981104
self.var_list.listen("insert", insert_watch)
1105+
self.var_list.listen("delete", change_var_state)
10991106

11001107
self.var_list.listen("[", partial(change_rhs_box, "variables", 0, -1))
11011108
self.var_list.listen("]", partial(change_rhs_box, "variables", 0, 1))

0 commit comments

Comments
 (0)