From 131d92e587d608de205d8d5d2a061e94825601e9 Mon Sep 17 00:00:00 2001 From: EsVagy42 Date: Tue, 9 Sep 2025 19:25:51 +0200 Subject: [PATCH] Added c# debugger --- config/dap.nix | 54 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/config/dap.nix b/config/dap.nix index 0db9063..f53f083 100644 --- a/config/dap.nix +++ b/config/dap.nix @@ -3,27 +3,43 @@ dap = { enable = true; luaConfig.post = '' - local dap = require('dap') - dap.adapters.lldb = { - type = 'executable', - command = '/run/current-system/sw/bin/lldb-dap', -- adjust as needed, must be absolute path - name = 'lldb' - } - dap.configurations.cpp = { - { - name = 'Launch', - type = 'lldb', - request = 'launch', - program = function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') - end, - cwd = "''${workspaceFolder}", - stopOnEntry = true, - args = {}, + local dap = require('dap') + dap.adapters.lldb = { + type = 'executable', + command = '/run/current-system/sw/bin/lldb-dap', -- adjust as needed, must be absolute path + name = 'lldb' + } + dap.configurations.cpp = { + { + name = 'Launch', + type = 'lldb', + request = 'launch', + program = function() + return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') + end, + cwd = "''${workspaceFolder}", + stopOnEntry = true, + args = {}, runInTerminal = true, - }, + }, + } + + dap.adapters.coreclr = { + type = 'executable', + command = '/run/current-system/sw/bin/netcoredbg', + args = {'--interpreter=vscode'}, + name = 'netcoreclr' } - ''; + 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, + }, + } ''; }; }; }