Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anyone got to get the debugger adapter to work with nvim-dap? #175

Open
janlimpens opened this issue Feb 18, 2023 · 3 comments
Open

Anyone got to get the debugger adapter to work with nvim-dap? #175

janlimpens opened this issue Feb 18, 2023 · 3 comments

Comments

@janlimpens
Copy link

I would be very grateful for instructions or pointers into the right direction.

@jarekrzdbk
Copy link

I just started, as per nvim-dap documentation I added adapter and configuration for it, Perl-LanguageServer already installed as extension to vscode, it is very basic,
I hope to improve it,
here is my init.vim
call plug#begin()

Plug 'mfussenegger/nvim-dap'

call plug#end()

let mapleader = " " " space as leader key
lua << EOF
local dap = require('dap')
dap.adapters.perl = {
type = 'executable',
command = 'node',
args = {'/path to debugger /out/dbgforward.js'}
}
dap.configurations.perl = {
{
type = 'perl',
name = 'Debug',
request = 'launch',
showLog = falsjje,
program = "${file}",
stopOnEntry = true,
reloadModules = true,
args = {arguments for script I am debugging}
}
}
vim.keymap.set('n', '', function() require('dap').continue() end)
vim.keymap.set('n', '', function() require('dap').step_over() end)
vim.keymap.set('n', '', function() require('dap').step_into() end)
vim.keymap.set('n', '', function() require('dap').step_out() end)
vim.keymap.set('n', 'b', function() require('dap').toggle_breakpoint() end)
vim.keymap.set('n', 'B', function() require('dap').set_breakpoint() end)
vim.keymap.set('n', 'lp', function() require('dap').set_breakpoint(nil, nil, vim.fn.input('Log point message: ')) end)
vim.keymap.set('n', 'dr', function() require('dap').repl.open() end)
vim.keymap.set('n', 'dl', function() require('dap').run_last() end)
vim.keymap.set({'n', 'v'}, 'dh', function()
require('dap.ui.widgets').hover()
end)
vim.keymap.set({'n', 'v'}, 'dp', function()
require('dap.ui.widgets').preview()
end)
vim.keymap.set('n', 'df', function()
local widgets = require('dap.ui.widgets')
widgets.centered_float(widgets.frames)
end)
vim.keymap.set('n', 'ds', function()
local widgets = require('dap.ui.widgets')
widgets.centered_float(widgets.scopes)
end)
EOF

@jarekrzdbk
Copy link

please, write if you will be able to add nvim-dap-ui

@janlimpens
Copy link
Author

Thanks a lot, this is of great help! I'll update this thread with my findings (if any ;)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants