Skip to content

Commit f07d0fe

Browse files
committed
fix: moved to lldb
1 parent b39a9a1 commit f07d0fe

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

lua/plugins/config/debug/adapters.lua

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,30 +65,20 @@ function M.setup_python(dap)
6565
}
6666
end
6767

68-
-- C/C++/Rust debugger configuration (using codelldb)
68+
-- C/C++/Rust debugger configuration (using lldb-dap)
6969
function M.setup_cpp(dap)
70-
-- CodeLLDB adapter
71-
dap.adapters.codelldb = {
72-
type = 'server',
73-
port = '${port}',
74-
executable = {
75-
command = 'codelldb',
76-
args = { '--port', '${port}' },
77-
},
78-
}
79-
80-
-- Alternative: Use lldb-vscode if codelldb is not available
70+
-- LLDB-DAP adapter (modern LLDB with DAP support)
8171
dap.adapters.lldb = {
8272
type = 'executable',
83-
command = '/usr/bin/lldb-vscode', -- Adjust path as needed
73+
command = 'lldb-dap', -- Will use lldb-dap from PATH (Nix environment)
8474
name = 'lldb',
8575
}
8676

8777
-- C++ configuration
8878
dap.configurations.cpp = {
8979
{
9080
name = 'Launch',
91-
type = 'codelldb',
81+
type = 'lldb',
9282
request = 'launch',
9383
program = function()
9484
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
@@ -100,7 +90,7 @@ function M.setup_cpp(dap)
10090
},
10191
{
10292
name = 'Launch with arguments',
103-
type = 'codelldb',
93+
type = 'lldb',
10494
request = 'launch',
10595
program = function()
10696
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
@@ -115,7 +105,7 @@ function M.setup_cpp(dap)
115105
},
116106
{
117107
name = 'Attach to process',
118-
type = 'codelldb',
108+
type = 'lldb',
119109
request = 'attach',
120110
pid = require('dap.utils').pick_process,
121111
args = {},

0 commit comments

Comments
 (0)