Files
dotfiles/.config/nvim/lua/user/dap/dap.lua
2024-01-02 22:38:47 +05:00

38 lines
829 B
Lua

local dap_status_ok, dap = pcall(require, "dap")
if not dap_status_ok then
return
end
local dapui_status_ok, dapui = pcall(require, "dapui")
if not dapui_status_ok then
return
end
dap.adapters.coreclr = {
type = 'executable',
command = '/usr/local/netcoredbg',
args = {'--interpreter=vscode'}
}
dap.configurations.cs = {
{
type = "coreclr",
name = "launch - netcoredbg",
request = "launch",
program = function()
return vim.fn.input('Path to dll', vim.fn.getcwd() .. '/bin/Debug/', 'file')
end,
},
}
--Autostart ui when debugging
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close()
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close()
end