-
Notifications
You must be signed in to change notification settings - Fork 484
Closed
Labels
dapDebug Adapter related issuesDebug Adapter related issuesenhancementNew feature or requestNew feature or request
Description
Feature description
lldb-vscode is the vscode-dap wrapped version of lldb, it does embed with pretty print features, making commonly used rust data structures like std::string::String, std::sync::Arc, std::collections::Vec hard to read.
This is an example of the view of &str, all static string in the executable image came out together, too much noise!
Switching to CodeLLDB, that's much usable.
Additional information
I've been using codelldb on my customized branch, but I don't know how to ensure the users will have a local image of codelldb. What I can do is paste my configuration here as an example:
-- lua/modules/tools/dap/dap-lldb.lua
-- other configurations
local codelldb_port = "65472"
dap.adapters.codelldb = {
type = "server",
port = codelldb_port,
executable = {
command = os.getenv("HOME") .. "/" .. ".local/share/nvim/mason/bin/codelldb", -- installed with mason
args = { "--port", codelldb_port },
},
name = "codelldb",
}
-- copy from cpp with custom type
dap.configurations.rust = {
{
name = "Launch",
type = "codelldb",
request = "launch",
program = function()
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
end,
cwd = "${workspaceFolder}",
stopOnEntry = false,
args = function()
local input = vim.fn.input("Input args: ")
return vim.fn.split(input, " ", true)
end,
-- 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,
},
}-- lua/modules/config/lang/rust-tools.lua
-- other configurations
dap = {
adapter = require("nvim-dap").adapters.codelldb,
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
dapDebug Adapter related issuesDebug Adapter related issuesenhancementNew feature or requestNew feature or request

