debug
This commit is contained in:
parent
71404b98aa
commit
33383e5fbf
@ -39,6 +39,9 @@ map("n", "<S-tab>", "<Cmd>BufferPrevious<CR>", { desc = "Previous tab" })
|
|||||||
|
|
||||||
-- dap
|
-- dap
|
||||||
map("n", "<leader>bb", dap.toggle_breakpoint, { desc = "Toggle breakpoint" })
|
map("n", "<leader>bb", dap.toggle_breakpoint, { desc = "Toggle breakpoint" })
|
||||||
|
map("n", "<F5>", dap.step_into, { desc = "Step into" })
|
||||||
|
map("n", "<F6>", dap.step_over, { desc = "Step over" })
|
||||||
|
map("n", "<F8>", dap.continue, { desc = "Continue" })
|
||||||
|
|
||||||
-- nvterm
|
-- nvterm
|
||||||
map("n", "<leader>t", function()
|
map("n", "<leader>t", function()
|
||||||
|
@ -1,16 +1,62 @@
|
|||||||
local gitsigns = require("gitsigns")
|
local gitsigns = require("gitsigns")
|
||||||
local dap = require("dap")
|
local dap = require("dap")
|
||||||
|
local dapui = require("dapui")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
name = " Toggle breakpoint",
|
name = " Debug",
|
||||||
cmd = dap.toggle_breakpoint,
|
hl = "Exblue",
|
||||||
rtext = "<leader>bb",
|
items = {
|
||||||
},
|
{
|
||||||
|
name = " Toggle breakpoint",
|
||||||
|
cmd = dap.toggle_breakpoint,
|
||||||
|
rtxt = "<leader>bb",
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name = " Run debug",
|
name = " Run debug",
|
||||||
cmd = dap.continue,
|
cmd = dap.continue,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name = " Eval",
|
||||||
|
cmd = dapui.eval,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name = " Stack",
|
||||||
|
cmd = function()
|
||||||
|
require("dapui").float_element("stacks")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{ name = "separator" },
|
||||||
|
|
||||||
|
{
|
||||||
|
name = " Step into",
|
||||||
|
cmd = dap.step_into,
|
||||||
|
rtxt = "<F5>",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name = " Step over",
|
||||||
|
cmd = dap.step_over,
|
||||||
|
rtxt = "<F6>",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name = " Continue",
|
||||||
|
cmd = dap.continue,
|
||||||
|
rtxt = "<F8>",
|
||||||
|
},
|
||||||
|
|
||||||
|
{ name = "separator" },
|
||||||
|
|
||||||
|
{
|
||||||
|
name = " Toggle UI",
|
||||||
|
cmd = require("dapui").toggle,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{ name = "separator" },
|
{ name = "separator" },
|
||||||
|
@ -10,18 +10,18 @@ return {
|
|||||||
config = function()
|
config = function()
|
||||||
local dap, dapui = require("dap"), require("dapui")
|
local dap, dapui = require("dap"), require("dapui")
|
||||||
|
|
||||||
dap.listeners.before.attach.dapui_config = function()
|
-- dap.listeners.before.attach.dapui_config = function()
|
||||||
dapui.open()
|
-- dapui.open()
|
||||||
end
|
-- end
|
||||||
dap.listeners.before.launch.dapui_config = function()
|
-- dap.listeners.before.launch.dapui_config = function()
|
||||||
dapui.open()
|
-- dapui.open()
|
||||||
end
|
-- end
|
||||||
dap.listeners.before.event_terminated.dapui_config = function()
|
-- dap.listeners.before.event_terminated.dapui_config = function()
|
||||||
dapui.close()
|
-- dapui.close()
|
||||||
end
|
-- end
|
||||||
dap.listeners.before.event_exited.dapui_config = function()
|
-- dap.listeners.before.event_exited.dapui_config = function()
|
||||||
dapui.close()
|
-- dapui.close()
|
||||||
end
|
-- end
|
||||||
|
|
||||||
fn.sign_define("DapBreakpoint", { text = "", texthl = "red", linehl = "", numhl = "" })
|
fn.sign_define("DapBreakpoint", { text = "", texthl = "red", linehl = "", numhl = "" })
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user