debugging, added mason pacakge for codelldb
parent
6c2df0572b
commit
0885e0e9b9
|
@ -106,8 +106,9 @@ return {
|
||||||
-- Rust
|
-- Rust
|
||||||
dap.adapters.lldb = {
|
dap.adapters.lldb = {
|
||||||
type = "executable",
|
type = "executable",
|
||||||
command = "/usr/bin/lldb", -- Adjust the path to your codelldb executable
|
command = "codelldb",
|
||||||
name = "lldb",
|
name = "lldb",
|
||||||
|
-- args = { "--log", "--log-file=/tmp/codelldb.log" },
|
||||||
}
|
}
|
||||||
|
|
||||||
dap.configurations.rust = {
|
dap.configurations.rust = {
|
||||||
|
@ -125,6 +126,27 @@ return {
|
||||||
-- Additional LLDB-specific settings
|
-- Additional LLDB-specific settings
|
||||||
runInTerminal = false,
|
runInTerminal = false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "Debug Test",
|
||||||
|
type = "lldb",
|
||||||
|
request = "launch",
|
||||||
|
program = function()
|
||||||
|
-- Prompt the user for the test binary
|
||||||
|
return vim.fn.input("Path to test binary: ", vim.fn.getcwd() .. "/target/debug/deps/", "file")
|
||||||
|
end,
|
||||||
|
cwd = "${workspaceFolder}",
|
||||||
|
stopOnEntry = false,
|
||||||
|
args = function()
|
||||||
|
-- Prompt the user for the specific test function to run
|
||||||
|
local test_name = vim.fn.input("Test name (leave empty to run all tests): ")
|
||||||
|
if test_name ~= "" then
|
||||||
|
return { "--exact", test_name }
|
||||||
|
else
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
runInTerminal = false,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
|
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
|
||||||
|
|
Loading…
Reference in New Issue