fix: moved to lldb
This commit is contained in:
parent
b39a9a1b72
commit
f07d0fe5b6
|
@ -65,22 +65,12 @@ function M.setup_python(dap)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
-- C/C++/Rust debugger configuration (using codelldb)
|
-- C/C++/Rust debugger configuration (using lldb-dap)
|
||||||
function M.setup_cpp(dap)
|
function M.setup_cpp(dap)
|
||||||
-- CodeLLDB adapter
|
-- LLDB-DAP adapter (modern LLDB with DAP support)
|
||||||
dap.adapters.codelldb = {
|
|
||||||
type = 'server',
|
|
||||||
port = '${port}',
|
|
||||||
executable = {
|
|
||||||
command = 'codelldb',
|
|
||||||
args = { '--port', '${port}' },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Alternative: Use lldb-vscode if codelldb is not available
|
|
||||||
dap.adapters.lldb = {
|
dap.adapters.lldb = {
|
||||||
type = 'executable',
|
type = 'executable',
|
||||||
command = '/usr/bin/lldb-vscode', -- Adjust path as needed
|
command = 'lldb-dap', -- Will use lldb-dap from PATH (Nix environment)
|
||||||
name = 'lldb',
|
name = 'lldb',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +78,7 @@ function M.setup_cpp(dap)
|
||||||
dap.configurations.cpp = {
|
dap.configurations.cpp = {
|
||||||
{
|
{
|
||||||
name = 'Launch',
|
name = 'Launch',
|
||||||
type = 'codelldb',
|
type = 'lldb',
|
||||||
request = 'launch',
|
request = 'launch',
|
||||||
program = function()
|
program = function()
|
||||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||||
|
@ -100,7 +90,7 @@ function M.setup_cpp(dap)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = 'Launch with arguments',
|
name = 'Launch with arguments',
|
||||||
type = 'codelldb',
|
type = 'lldb',
|
||||||
request = 'launch',
|
request = 'launch',
|
||||||
program = function()
|
program = function()
|
||||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||||
|
@ -115,7 +105,7 @@ function M.setup_cpp(dap)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = 'Attach to process',
|
name = 'Attach to process',
|
||||||
type = 'codelldb',
|
type = 'lldb',
|
||||||
request = 'attach',
|
request = 'attach',
|
||||||
pid = require('dap.utils').pick_process,
|
pid = require('dap.utils').pick_process,
|
||||||
args = {},
|
args = {},
|
||||||
|
|
Loading…
Reference in New Issue