add args to debug run of code

This commit is contained in:
Ivar Fatland
2025-04-22 07:30:39 +02:00
parent 846acbc899
commit 08f2125226
+5 -1
View File
@@ -400,6 +400,7 @@ require'lazy'.setup{ --{{{1
command = vim.fn.exepath('lldb-dap'), command = vim.fn.exepath('lldb-dap'),
name = 'lldb' name = 'lldb'
} }
dap.configurations.c = { dap.configurations.c = {
{ {
name = 'Launch', name = 'Launch',
@@ -410,7 +411,10 @@ require'lazy'.setup{ --{{{1
end, end,
cwd = '${workspaceFolder}', cwd = '${workspaceFolder}',
stopOnEntry = false, stopOnEntry = false,
args = {}, args = function()
local i = vim.fn.input('input args: ')
return vim.fn.split(i)
end,
runInTerminal = true, runInTerminal = true,
}, },
} }