nvim: Connect to remote session with lldb-dap

This commit is contained in:
Oshgnacknak 2025-07-31 18:18:31 +02:00
parent d3f8b0dc54
commit acd8a470fb
Signed by: Oshgnacknak
GPG key ID: 8CB7375654585956
2 changed files with 15 additions and 17 deletions

View file

@ -1,4 +1,4 @@
autocmd colorscheme * highlight EndOfBuffer guibg=NONE ctermbg=NONE
autocmd colorscheme * highlight Normal guibg=NONE ctermbg=NONE
autocmd colorscheme * highlight NonText guibg=NONE ctermbg=NONE
colorscheme evening
colorscheme desert

View file

@ -3,46 +3,44 @@ local dapui = require("dapui")
dapui.setup({})
dap.adapters.codelldb = {
dap.adapters.lldb = {
type = 'server',
host = '127.0.0.1',
port = "${port}",
executable = {
command = '/usr/bin/codelldb',
args = {"--port", "${port}"},
command = '/usr/bin/lldb-dap',
args = { "--port", "${port}" },
}
}
dap.configurations.rust = {
{
name = "Remote Launch",
type = "codelldb",
name = "Attach to Remote via GDB Remote",
type = "lldb",
request = "launch",
args = {
"platform select remote-linux", -- For example: 'remote-linux', 'remote-macosx', 'remote-android', etc.
"platform connect connect://localhost:13000",
},
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
attachCommands = {
"platform select remote-linux",
"platform connect connect://localhost:13000",
},
cwd = '${workspaceFolder}',
cwd = "${workspaceFolder}",
stopOnEntry = false,
},
-- runInTerminal = true,
initCommands = {
"gdb-remote localhost:1234",
},
}
}
-- dap.configurations.rust = {
-- {
-- name = "Launch file",
-- name = "Launch File",
-- type = "codelldb",
-- request = "launch",
-- program = function()
-- return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
-- end,
-- cwd = '${workspaceFolder}',
-- runInTerminal = true,
-- stopOnEntry = false,
-- },
-- }