diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index fda0de0..6318265 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -87,14 +87,26 @@ dap.adapters.codelldb = { port = "${port}", executable = { -- CHANGE THIS to your path! - command = '/absolute/path/to/codelldb/extension/adapter/codelldb', + command = masonpath .. '/bin/codelldb.cmd', args = { '--port', '${port}' }, -- On windows you may have to uncomment this: - -- detached = false, + detached = false, } } +dap.configurations.cpp = { + { + name = "Launch file", + type = "codelldb", + request = "launch", + program = function() + return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') + end, + cwd = '${workspaceFolder}', + stopOnEntry = true, + }, +} -- EXTENSIONS