Added attach target to dap for c#, fixes #7
This commit is contained in:
parent
f1fc037a72
commit
a07935eb54
1 changed files with 42 additions and 36 deletions
|
|
@ -3,43 +3,49 @@
|
||||||
dap = {
|
dap = {
|
||||||
enable = true;
|
enable = true;
|
||||||
luaConfig.post = ''
|
luaConfig.post = ''
|
||||||
local dap = require('dap')
|
local dap = require('dap')
|
||||||
dap.adapters.lldb = {
|
dap.adapters.lldb = {
|
||||||
type = 'executable',
|
type = 'executable',
|
||||||
command = '/run/current-system/sw/bin/lldb-dap', -- adjust as needed, must be absolute path
|
command = '/run/current-system/sw/bin/lldb-dap', -- adjust as needed, must be absolute path
|
||||||
name = 'lldb'
|
name = 'lldb'
|
||||||
}
|
}
|
||||||
dap.configurations.cpp = {
|
dap.configurations.cpp = {
|
||||||
{
|
{
|
||||||
name = 'Launch',
|
name = 'Launch',
|
||||||
type = 'lldb',
|
type = 'lldb',
|
||||||
request = 'launch',
|
request = 'launch',
|
||||||
program = function()
|
program = function()
|
||||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||||
end,
|
end,
|
||||||
cwd = "''${workspaceFolder}",
|
cwd = "''${workspaceFolder}",
|
||||||
stopOnEntry = true,
|
stopOnEntry = true,
|
||||||
args = {},
|
args = {},
|
||||||
runInTerminal = true,
|
runInTerminal = true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
dap.adapters.coreclr = {
|
dap.adapters.coreclr = {
|
||||||
type = 'executable',
|
type = 'executable',
|
||||||
command = '/run/current-system/sw/bin/netcoredbg',
|
command = '/run/current-system/sw/bin/netcoredbg',
|
||||||
args = {'--interpreter=vscode'},
|
args = {'--interpreter=vscode'},
|
||||||
name = 'netcoreclr'
|
name = 'netcoreclr'
|
||||||
}
|
}
|
||||||
dap.configurations.cs = {
|
dap.configurations.cs = {
|
||||||
{
|
{
|
||||||
type = "coreclr",
|
type = "coreclr",
|
||||||
name = "launch - netcoredbg",
|
name = "launch - netcoredbg",
|
||||||
request = "launch",
|
request = "launch",
|
||||||
program = function()
|
program = function()
|
||||||
return vim.fn.input('Path to dll ', vim.fn.getcwd() .. '/bin/Debug/', 'file')
|
return vim.fn.input('Path to dll ', vim.fn.getcwd() .. '/bin/Debug/', 'file')
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
} '';
|
{
|
||||||
|
type = "coreclr",
|
||||||
|
name = "attach - netcoredbg",
|
||||||
|
request = "attach",
|
||||||
|
processId = require("dap.utils").pick_process,
|
||||||
|
}
|
||||||
|
} '';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue