local dap = require("dap") local dap_ui = require("dap.ui.widgets") dap.adapters.coreclr = { type = "executable", command = "netcoredbg", args = { "--interpreter=vscode" }, } dap.configurations.fsharp = { { type = "coreclr", name = "launch - netcoredbg", request = "launch", program = function() return vim.fn.input("Path to dll: ", vim.fn.getcwd() .. "/bin/Debug/", "file") end, }, } 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, }, } do local whichkey = require("which-key") whichkey.add({ { "d", desc = "Debugger-related commands" }, { "do", dap.step_over, desc = "Step over" }, { "di", dap.step_into, desc = "Step into" }, { "dc", dap.continue, desc = "Continue" }, { "dC", dap.run_last, desc = "Run with last debug configuration" }, { "db", dap.toggle_breakpoint, desc = "Toggle breakpoint" }, { "dr", dap.repl.open, desc = "Open debug repl" }, { "dv", desc = "Commands to view debugger state" }, { "dvv", function() dap_ui.hover() end, desc = "View value of expression under cursor", }, { "dvs", function() dap_ui.sidebar(dap_ui.scopes).open() end, desc = "View values of all variables in all scopes", }, { "dvf", function() dap_ui.sidebar(dap_ui.frames).open() end, desc = "View stack frames", }, { "dt", dap.terminate, desc = "Terminate/stop/end debug session" }, }) end