feat(nvim/dap): gdb debuuger
This commit is contained in:
parent
27c690efc5
commit
65aa4f26ee
39
debugger.lua
39
debugger.lua
@ -59,3 +59,42 @@ dap.configurations.c = {
|
|||||||
request = 'attach',
|
request = 'attach',
|
||||||
processId = require('dap.utils').pick_process,
|
processId = require('dap.utils').pick_process,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "Debug J-Link",
|
||||||
|
type = "cdbg",
|
||||||
|
request = "launch",
|
||||||
|
cwd = "${workspaceFolder}",
|
||||||
|
program = function()
|
||||||
|
local path = vim.fn.input({
|
||||||
|
prompt = 'Path to executable: ',
|
||||||
|
default = vim.fn.getcwd() .. '/',
|
||||||
|
completion = 'file',
|
||||||
|
})
|
||||||
|
|
||||||
|
return (path and path ~= '') and path or dap.ABORT
|
||||||
|
end,
|
||||||
|
stopAtEntry = false,
|
||||||
|
MIMode = "gdb",
|
||||||
|
miDebuggerServerAddress = function()
|
||||||
|
local address = vim.fn.input({
|
||||||
|
prompt = 'Server address: ',
|
||||||
|
default = 'localhost:3333',
|
||||||
|
})
|
||||||
|
|
||||||
|
return address
|
||||||
|
end,
|
||||||
|
|
||||||
|
miDebuggerPath = "gdb-multiarch",
|
||||||
|
serverLaunchTimeout = 5000,
|
||||||
|
postRemoteConnectCommands = {
|
||||||
|
{
|
||||||
|
text = "monitor reset",
|
||||||
|
ignoreFailures = false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text = "load",
|
||||||
|
ignoreFailures = false
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
2
rust.lua
2
rust.lua
@ -10,7 +10,7 @@ vim.g.rustaceanvim = {
|
|||||||
|
|
||||||
test_executor = require('rustaceanvim.executors').neotest;
|
test_executor = require('rustaceanvim.executors').neotest;
|
||||||
|
|
||||||
crate_test_executor = require('rustaceanvim.executors').background;
|
crate_test_executor = require('rustaceanvim.executors').neotest;
|
||||||
|
|
||||||
-- callback to execute once rust-analyzer is done initializing the workspace
|
-- callback to execute once rust-analyzer is done initializing the workspace
|
||||||
-- The callback receives one parameter indicating the `health` of the server: "ok" | "warning" | "error"
|
-- The callback receives one parameter indicating the `health` of the server: "ok" | "warning" | "error"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user