feat: add clear all breakpoints (D), keep signs visible outside debug mode
This commit is contained in:
3 files changed
+8
-1
No files matched your search
@@ -39,6 +39,11 @@ function M.setup()
|
|||||||
require("persistent-breakpoints.api").set_conditional_breakpoint()
|
require("persistent-breakpoints.api").set_conditional_breakpoint()
|
||||||
end, { silent = true, desc = "tiny-debugger: conditional breakpoint" })
|
end, { silent = true, desc = "tiny-debugger: conditional breakpoint" })
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
@@ -17,6 +17,7 @@ M.defaults = {
|
|||||||
eval = "E",
|
eval = "E",
|
||||||
terminate = "q",
|
terminate = "q",
|
||||||
restart = "R",
|
restart = "R",
|
||||||
|
clear_breakpoints = "D",
|
||||||
help = "?",
|
help = "?",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ local key_labels = {
|
|||||||
run_to_cursor = "Run to cursor",
|
run_to_cursor = "Run to cursor",
|
||||||
breakpoint = "Toggle breakpoint",
|
breakpoint = "Toggle breakpoint",
|
||||||
cond_breakpoint = "Conditional breakpoint",
|
cond_breakpoint = "Conditional breakpoint",
|
||||||
|
clear_breakpoints = "Clear all breakpoints",
|
||||||
watch = "Watch expression",
|
watch = "Watch expression",
|
||||||
hover = "Hover / inspect",
|
hover = "Hover / inspect",
|
||||||
eval = "Eval in REPL",
|
eval = "Eval in REPL",
|
||||||
@@ -24,7 +25,7 @@ local key_labels = {
|
|||||||
-- ordered list of key names for consistent display
|
-- ordered list of key names for consistent display
|
||||||
local key_order = {
|
local key_order = {
|
||||||
"continue", "step_over", "step_into", "step_out", "run_to_cursor",
|
"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",
|
"terminate", "restart", "help",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user