adapters: c/cpp/rust/swift via codelldb
This commit is contained in:
1 file changed
+34
-1
@@ -1 +1,34 @@
|
||||
return {}
|
||||
local loader = require("tiny-debugger.adapters.init")
|
||||
|
||||
local M = {}
|
||||
|
||||
function M.register(dap)
|
||||
local codelldb = loader.find_executable({ "codelldb" })
|
||||
if not codelldb then return end
|
||||
|
||||
local adapter = {
|
||||
type = "server",
|
||||
port = "${port}",
|
||||
executable = {
|
||||
command = codelldb,
|
||||
args = { "--port", "${port}" },
|
||||
},
|
||||
}
|
||||
|
||||
local configurations = {
|
||||
{
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
name = "Launch executable",
|
||||
program = function()
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
||||
end,
|
||||
cwd = "${workspaceFolder}",
|
||||
stopOnEntry = false,
|
||||
},
|
||||
}
|
||||
|
||||
loader.register(dap, "codelldb", adapter, configurations, { "c", "cpp", "rust", "swift" })
|
||||
end
|
||||
|
||||
return M
|
||||
Reference in new issue
Block a user