feat: add clear all breakpoints (D), keep signs visible outside debug mode

This commit is contained in:
swaits committed 2026-04-11 18:41:58 -06:00
1 parent d5848f9e6b
commit 742acd26cc
3 files changed
+8 -1

No files matched your search

+5
View File
@@ -39,6 +39,11 @@ function M.setup()
require("persistent-breakpoints.api").set_conditional_breakpoint()
end, { silent = true, desc = "tiny-debugger: conditional breakpoint" })
end
if keys.clear_breakpoints then
vim.keymap.set("n", keys.clear_breakpoints, function()
require("persistent-breakpoints.api").clear_all_breakpoints()
end, { silent = true, desc = "tiny-debugger: clear all breakpoints" })
end
end
return M
+1
View File
@@ -17,6 +17,7 @@ M.defaults = {
eval = "E",
terminate = "q",
restart = "R",
clear_breakpoints = "D",
help = "?",
},
+2 -1
View File
@@ -13,6 +13,7 @@ local key_labels = {
run_to_cursor = "Run to cursor",
breakpoint = "Toggle breakpoint",
cond_breakpoint = "Conditional breakpoint",
clear_breakpoints = "Clear all breakpoints",
watch = "Watch expression",
hover = "Hover / inspect",
eval = "Eval in REPL",
@@ -24,7 +25,7 @@ local key_labels = {
-- ordered list of key names for consistent display
local key_order = {
"continue", "step_over", "step_into", "step_out", "run_to_cursor",
"breakpoint", "cond_breakpoint", "watch", "hover", "eval",
"breakpoint", "cond_breakpoint", "clear_breakpoints", "watch", "hover", "eval",
"terminate", "restart", "help",
}