mirror of
https://github.com/TheM1Stery/dotfiles.git
synced 2025-04-20 00:51:11 +00:00
change cpp debugger to codelldb and configure it to handle rust
This commit is contained in:
parent
4be1094312
commit
c65e4792a1
@ -24,10 +24,28 @@ return {
|
|||||||
|
|
||||||
-- c/c++ debugger
|
-- c/c++ debugger
|
||||||
local dap = require("dap")
|
local dap = require("dap")
|
||||||
dap.adapters.cppdbg = {
|
dap.adapters.codelldb = {
|
||||||
id = "cppdbg",
|
type = "server",
|
||||||
type="executable",
|
port = "${port}",
|
||||||
command = vim.fn.stdpath("data") .. "/mason/bin/OpenDebugAD7"
|
executable = {
|
||||||
|
command = vim.fn.stdpath("data") .. "/mason/bin/codelldb",
|
||||||
|
args = {"--port", "${port}"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dap.configurations.rust = {
|
||||||
|
{
|
||||||
|
name = "Rust Debug",
|
||||||
|
type = "codelldb",
|
||||||
|
request = "launch",
|
||||||
|
program = function()
|
||||||
|
vim.fn.jobstart("cargo build");
|
||||||
|
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/target/debug", "file")
|
||||||
|
end,
|
||||||
|
cwd = "${workspaceFolder}",
|
||||||
|
stopOnEntry = true,
|
||||||
|
showDisassembly = false,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user