added lldb-vscode adapter

This commit is contained in:
Oliver Hartmann 2022-08-13 19:54:12 +02:00
parent e6d1091430
commit e72eaa724e

View File

@ -95,19 +95,52 @@ dap.adapters.codelldb = {
} }
} }
dap.adapters.lldb = {
type = 'executable',
command = os.getenv('SCOOP') .. '/apps/llvm/current/bin/lldb-vscode.exe',
name = 'lldb'
}
dap.configurations.cpp = { dap.configurations.cpp = {
{ {
name = "Launch file", name = "Launch codelldb",
type = "codelldb", type = "codelldb",
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() .. '/build_nvim/', 'file')
end, end,
cwd = '${workspaceFolder}', cwd = '${workspaceFolder}',
stopOnEntry = true, stopOnEntry = true,
}, },
} }
dap.configurations.cpp = {
{
name = 'Launch lldb',
type = 'lldb',
request = 'launch',
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build_nvim', 'file')
end,
cwd = '${workspaceFolder}',
stopOnEntry = false,
args = {},
-- 💀
-- if you change `runInTerminal` to true, you might need to change the yama/ptrace_scope setting:
--
-- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
--
-- Otherwise you might get the following error:
--
-- Error on launch: Failed to attach to the target process
--
-- But you should be aware of the implications:
-- https://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html
-- runInTerminal = false,
},
}
-- EXTENSIONS -- EXTENSIONS
require("nvim-dap-virtual-text").setup() require("nvim-dap-virtual-text").setup()