added lldb-vscode adapter
This commit is contained in:
parent
e6d1091430
commit
e72eaa724e
@ -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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user