pocco81 / dap-buddy.nvim Goto Github PK
View Code? Open in Web Editor NEW🐞 Debug Adapter Protocol manager for Neovim
License: GNU General Public License v3.0
🐞 Debug Adapter Protocol manager for Neovim
License: GNU General Public License v3.0
Hi!
I have install dap following this post, and trying to setup debugging for c/c++.
But after doing :DIInstall ccppr_lldb and adding
dap_install.config("ccppr_lldb", {})
to the dapinstall.lua config file, I'm still getting an error
No configuration found for `c`. You need to add configs to `dap.configurations.c`
How do I add the configurations for c?
Frame skipped from debugging during step-in.
Note: may have been skipped because of "justMyCode" option (default == true). Try setting "justMyCode": false in the debug configuration (e.g., launch.json).
How do I fix this?
During the implementation of vscode-chrome-debug
I noticed something that got me confused.
In debuggers_list.lua
there is the following structure:
M.debuggers = {
["python"] = { "python" },
["go"] = { "go" },
["lua"] = { "lua" },
["markdown"] = { "markdown" },
["jsnode"] = { "javascript" },
["php"] = { "php" },
["dnetcs"] = { "cs" },
["go_delve"] = { "go" },
["ccppr_lldb"] = { "c", "cpp", "cpp_matchup", "rust" },
["ccppr_vsc"] = { "c", "cpp", "cpp_matchup", "rust" },
["dart"] = { "dart" },
["ruby_vsc"] = { "ruby" },
}
At first, I thought that the values of this table are being used in order to add the configuration of each debugger for each of the above languages.
But I noticed that this is not the case, and actually what is being done is that in the load
function we use dap_info
property that exists in each adapter.
So, what is the purpose of the above values? Am I missing something here?
Thanks.
Hello,
Thanks for this awesome plugin!
I have the following configuration:
dap_install.config('ruby_vsc_dbg', {
configurations = {
{
name = "Run RSpec until the next failure";
type = "ruby";
request = "launch";
cwd = "${workspaceFolder}";
useBundler = true;
pathToBundler = "/Users/brandoncc/.asdf/shims/bundle";
pathToRDebugIDE = "/Users/brandoncc/.asdf/shims/rdebug-ide";
showDebuggerOutput = true;
program = "${workspaceFolder}/bin/rspec";
args = { "--next-failure" };
}
}
})
However, this is my applied configuration:
{
config = {
adapters = {
args = { "/Users/brandoncc/.local/share/nvim/dapinstall/ruby_vsc_dbg/extension/dist/debugger/main.js" },
command = "node",
type = "executable"
},
configurations = { {
args = { "--next-failure" },
name = "Run RSpec until the next failure",
program = "${workspaceFolder}/bin/rspec",
request = "launch",
type = "ruby"
} }
},
dap_info = {
name_adapter = "ruby",
name_configuration = "ruby"
},
installer = {
before = "",
install = " wget https://github.com/rubyide/vscode-ruby/releases/download/v0.25.0/ruby-0.25.0.vsix\n mv rub
y-0.25.0.vsix ruby-0.25.0.zip\n unzip ruby-0.25.0.zip\n printf \"\\n\\n\\n\"\n echo 'Do not forget to ad
d `ruby-debug-ide` gem to your bundle or system!'\n ",
uninstall = "simple"
}
}
Do the missing configuration keys need to be whitelisted? Here is the documentation for the configuration keys.
So this should be straightforward (IMHO).
The implementation has been done by Microsoft, and I think the implementation here could be as straightforward as python for an example.
I want to contribute to this project since this is a great project in my opinion. Let me know if there is any opinion about this initial discussion
Keep it up!
It doesn't matter which adapter I'm trying to install, nvim crashes with the following error:
:DIInstall jsnode
Do you want to install the debugger 'jsnode'?
[Y]es, (C)ancel: nvim: /home/runner/work/neovim/neovim/src/nvim/ui_compositor.c:551: ui_comp_raw_line: Assertion `attrs[i] >= 0' failed.
[1] 55171 abort (core dumped) nvim
This seems to only happen when the lualine plugin is enabled. Is anyone else experiencing this?
I have used rogalmic/vscode-bash-debug with nvim-dap to debug bash scripts. it seems that it is no longer maintained, but an unmaintained debugger is better than nothing.
Plug 'rogalmic/vscode-bash-debug', { 'do': 'npm install && npm run compile' }
dap.adapters = {
bashdb = {
type = "executable",
command = "node",
args = {vim.g.plug_home .. "/vscode-bash-debug/out/bashDebug.js"}
},
}
local config = {
bash = {
{
type = 'bashdb',
request = 'launch',
name = 'Launch file',
program = '${file}',
cwd = vim.fn.getcwd(),
args = function()
local args_string = vim.fn.input('Arguments: ')
return vim.split(args_string, " +")
end,
env = {
BASHDB_HOME = vim.g.plug_home .. '/vscode-bash-debug/bashdb_dir',
},
protocol = 'inspector',
console = 'integratedTerminal',
pathBashdb = vim.g.plug_home .. '/vscode-bash-debug/bashdb_dir/bashdb',
pathBashdbLib = vim.g.plug_home .. '/vscode-bash-debug/bashdb_dir',
pathMkfifo = 'mkfifo',
pathPkill = 'pkill',
pathBash = 'bash',
pathCat = 'cat',
},
},
}
dap.configurations = {
bash = config.bash,
sh = config.bash,
}
I'm new to dap, I don't know too much, but it seems that jsnode
should have ${workspaceFolder}/${file}
in program
This is the error:
Error on launch: Attribute 'program' is not absolute ('{path}'); consider adding '${workspaceFolder}/' as a prefix to make it absolute.
not sure if this belongs here.
In the default environment,in the python_dbg/pyvenv.cfg
the include-system-site-packages = false
blocks every module I want to load.
Sure I could install it in the venv. It still feels like a bug to me.
--2021-08-04 10:48:01-- https://github.com/Samsung/netcoredbg/releases/latest/download/netcoredbg-linux-bionic-amd64.tar.gz
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/Samsung/netcoredbg/releases/download/1.2.0-825/netcoredbg-linux-bionic-amd64.tar.gz [following]
--2021-08-04 10:48:01-- https://github.com/Samsung/netcoredbg/releases/download/1.2.0-825/netcoredbg-linux-bionic-amd64.tar.gz
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response... 404 Not Found
2021-08-04 10:48:02 ERROR 404: Not Found.
[Process exited 8]
Great plugin btw 👍
Currently, I have to manually instead of the dependences for the python within the environment.
Any tips on how to make it works with system packages?
When I run continue()
in a .ts
/.tsx
file I get the following error message: Debug adapter didn't respond. Either the adapter is slow (then wait and ignore this) or there is a problem with your adapter or 'chrome' configuration. Check the logs for errors (:help dap.set_log_level)
I've tried to use DAPInstall's default configuration as seen below, shouldn't that be enough to get a debugger up and running?:
local dap = require('dap')
local di = require('dap-install')
di.config('chrome', {})
I've also tried merging the above DAPInstall config with nvim-dap's instructions for typescript. But I'm not sure exactly how.
What am I doing wrong?
Hi,
dap-buddy looks cool, but how does a total noob uses this ? Let me say I have a fully configured NVIM (via LunarVim) and I want to debug some C code; I added dap+dap-buddy via lvim.builtin.dap.active = true
but now ... how do I debug (e.g.) C code ?
I use the dev
branch of dap-buddy.nvim
. I use :DIInstall python
to install the debuger for python. However, it can not find the dependenies even I installed them in
the PATH directories. I find the reason causes this issue. It is this line.
As the screenshot shows I print the output
variable. it should be a string of exists
. However, It includes the path. this line seems not work correctly for me.
Hey, thanks for making such an easy to use plugin. I've been able to get everything installed, but don't see any specific documentation on how to run the debugger. Could you let me know how to do that?
Calling :DIInstall ccppr_lldb
and confirming to install immediately outputs
It seems that you do not need to install this debugger: https://github.com/mfussenegger/nvim-dap/wiki/Debug-Adapte
r-installation#ccrust-via-lldb-vscode
Not sure if this is a DAPInstall or an nvim-dap issue however
Hi there,
I am using codelldb to debug c++ and configure it according to the steps in the wiki, but there are always error occurring.
Error executing vim.schedule lua callback: ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:308: attempt to concatenate field 'threadId' (a nil value)
stack traceback:
...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:308: in function 'callback'
...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:579: in function <...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:571>
Press ENTER or type command to continue
Debug adapter didn't respond. Either the adapter is slow (then wait and ignore this) or there is a problem with your adapter orcodelldb
configuration. Check the logs for
errors (:help dap.set_log_level)
Press ENTER or type command to continue
So I run :lua require"dap".set_log_level("DEBUG")
in the neovim and the following is the content in the dap.log
[ DEBUG ] 2022-01-10T14:14:35Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:804 ] "request" {
arguments = {
adapterID = "nvim-dap",
clientId = "neovim",
clientname = "neovim",
columnsStartAt1 = true,
linesStartAt1 = true,
locale = "en_US.UTF-8",
pathFormat = "path",
supportsRunInTerminalRequest = true,
supportsVariableType = true
},
command = "initialize",
seq = 0,
type = "request"
}
[ DEBUG ] 2022-01-10T14:14:36Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
exceptionBreakpointFilters = { {
default = true,
filter = "cpp_throw",
label = "C++: on throw"
}, {
default = false,
filter = "cpp_catch",
label = "C++: on catch"
} },
supportTerminateDebuggee = true,
supportsCancelRequest = true,
supportsCompletionsRequest = true,
supportsConditionalBreakpoints = true,
supportsConfigurationDoneRequest = true,
supportsDataBreakpoints = true,
supportsDelayedStackTraceLoading = true,
supportsEvaluateForHovers = true,
supportsFunctionBreakpoints = true,
supportsGotoTargetsRequest = true,
supportsHitConditionalBreakpoints = true,
supportsLogPoints = true,
supportsReadMemoryRequest = true,
supportsRestartFrame = true,
supportsSetVariable = true
},
command = "initialize",
request_seq = 0,
success = true,
type = "response"
}
[ DEBUG ] 2022-01-10T14:14:36Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:804 ] "request" {
arguments = {
cwd = "/Users/lsli/tmp/c++",
name = "Launch file",
program = "/Users/lsli/tmp/c++/main",
request = "launch",
stopOnEntry = true,
type = "codelldb"
},
command = "launch",
seq = 1,
type = "request"
}
[ DEBUG ] 2022-01-10T14:14:36Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
event = "initialized",
seq = 1,
type = "event"
}
[ DEBUG ] 2022-01-10T14:14:36Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:804 ] "request" {
arguments = {
breakpoints = { {
line = 5
} },
lines = { 5 },
source = {
name = "main.cpp",
path = "/Users/lsli/tmp/c++/main.cpp"
}
},
command = "setBreakpoints",
seq = 2,
type = "request"
}
[ DEBUG ] 2022-01-10T14:14:36Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
module = {
addressRange = "FFFFFFFFFFFFFFFF",
id = "FFFFFFFFFFFFFFFF",
name = "main",
path = "/Users/lsli/tmp/c++/main",
symbolFilePath = "/Users/lsli/tmp/c++/main",
symbolStatus = "Symbols loaded."
},
reason = "new"
},
event = "module",
seq = 2,
type = "event"
}
[ DEBUG ] 2022-01-10T14:14:36Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
arguments = {
args = { "/Users/lsli/.local/share/nvim/dapinstall/codelldb/extension/adapter/codelldb", "terminal-agent", "--port=51377" },
cwd = "",
kind = "integrated",
title = "Launch file"
},
command = "runInTerminal",
seq = 3,
type = "request"
}
[ DEBUG ] 2022-01-10T14:14:36Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:83 ] "run_in_terminal" {
args = { "/Users/lsli/.local/share/nvim/dapinstall/codelldb/extension/adapter/codelldb", "terminal-agent", "--port=51377" },
cwd = "",
kind = "integrated",
title = "Launch file"
}
[ DEBUG ] 2022-01-10T14:14:36Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:821 ] "response" {
body = {
processId = 20701
},
command = "runInTerminal",
request_seq = 3,
seq = 3,
success = true,
type = "response"
}
[ DEBUG ] 2022-01-10T14:14:36Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
breakpoints = { {
id = 1,
message = "Resolved locations: 0",
verified = false
} }
},
command = "setBreakpoints",
request_seq = 2,
success = true,
type = "response"
}
[ INFO ] 2022-01-10T14:14:36Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:472 ] "Server rejected breakpoint" {
id = 1,
message = "Resolved locations: 0",
verified = false
}
[ DEBUG ] 2022-01-10T14:14:36Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:804 ] "request" {
arguments = {
filters = { "cpp_throw" }
},
command = "setExceptionBreakpoints",
seq = 4,
type = "request"
}
[ DEBUG ] 2022-01-10T14:14:36Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
command = "setExceptionBreakpoints",
request_seq = 4,
success = true,
type = "response"
}
[ DEBUG ] 2022-01-10T14:14:36Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:804 ] "request" {
command = "configurationDone",
seq = 5,
type = "request"
}
[ DEBUG ] 2022-01-10T14:14:36Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
output = "Launching: /Users/lsli/tmp/c++/main\n"
},
event = "output",
seq = 4,
type = "event"
}
[ DEBUG ] 2022-01-10T14:14:36Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
output = "Launched process 20702\n"
},
event = "output",
seq = 5,
type = "event"
}
[ DEBUG ] 2022-01-10T14:14:36Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
allThreadsStopped = true,
reason = "unknown"
},
event = "stopped",
seq = 6,
type = "event"
}
[ DEBUG ] 2022-01-10T14:14:36Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
command = "launch",
request_seq = 1,
success = true,
type = "response"
}
[ DEBUG ] 2022-01-10T14:14:36Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
command = "configurationDone",
request_seq = 5,
success = true,
type = "response"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
module = {
id = "FFFFFFFFFFFFFFFF",
name = ""
},
reason = "removed"
},
event = "module",
seq = 7,
type = "event"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
module = {
addressRange = "100010000",
id = "100010000",
name = "dyld",
path = "/usr/lib/dyld",
symbolFilePath = "/usr/lib/dyld",
symbolStatus = "Symbols loaded."
},
reason = "new"
},
event = "module",
seq = 8,
type = "event"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
module = {
addressRange = "100000000",
id = "100000000",
name = "main",
path = "/Users/lsli/tmp/c++/main",
symbolFilePath = "/Users/lsli/tmp/c++/main",
symbolStatus = "Symbols loaded."
},
reason = "new"
},
event = "module",
seq = 9,
type = "event"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
category = "stderr",
output = "Stop reason: signal SIGSTOP\n"
},
event = "output",
seq = 10,
type = "event"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
allThreadsStopped = true,
reason = "signal",
text = "signal SIGSTOP",
threadId = 157296
},
event = "stopped",
seq = 11,
type = "event"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:804 ] "request" {
command = "threads",
seq = 6,
type = "request"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
threads = { {
id = 157296,
name = "1: tid=157296"
} }
},
command = "threads",
request_seq = 6,
success = true,
type = "response"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:804 ] "request" {
arguments = {
threadId = 157296
},
command = "stackTrace",
seq = 7,
type = "request"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:804 ] "request" {
arguments = {
threadId = 157296
},
command = "stackTrace",
seq = 8,
type = "request"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
stackFrames = { {
column = 0,
id = 1001,
line = 3,
name = "_dyld_start",
presentationHint = "subtle",
source = {
name = "@_dyld_start",
sourceReference = 1000
}
} },
totalFrames = 1
},
command = "stackTrace",
request_seq = 7,
success = true,
type = "response"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
stackFrames = { {
column = 0,
id = 1002,
line = 3,
name = "_dyld_start",
presentationHint = "subtle",
source = {
name = "@_dyld_start",
sourceReference = 1000
}
} },
totalFrames = 1
},
command = "stackTrace",
request_seq = 8,
success = true,
type = "response"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:804 ] "request" {
arguments = {
source = {
name = "@_dyld_start",
sourceReference = 1000
},
sourceReference = 1000
},
command = "source",
seq = 9,
type = "request"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:804 ] "request" {
arguments = {
frameId = 1001
},
command = "scopes",
seq = 10,
type = "request"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
content = '; id = {0x00000911}, range = [0x0000000000004ac0-0x0000000000004ad9), mangled="_dyld_start"\n; Source location: unknown\n100014AC0: 48 89 E7 movq %rsp, %rdi\n100014AC3: 6A 00 pushq $0x0\n100014AC5: 48 C7 C5 00 00 00 00 movq$0x0, %rbp\n100014ACC: 48 83 E4 F0 andq $ -0x10, %rsp\n100014AD0: 48 83 EC 08 subq $0x8, %rsp\n100014AD4: E9 57 08 00 00 jmp 0x100015330 ; start\n',
mimeType = "text/x-lldb.disassembly"
},
command = "source",
request_seq = 9,
success = true,
type = "response"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
scopes = { {
expensive = false,
name = "Local",
variablesReference = 1003
}, {
expensive = false,
name = "Static",
variablesReference = 1004
}, {
expensive = false,
name = "Global",
variablesReference = 1005
}, {
expensive = false,
name = "Registers",
variablesReference = 1006
} }
},
command = "scopes",
request_seq = 10,
success = true,
type = "response"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:804 ] "request" {
arguments = {
variablesReference = 1003
},
command = "variables",
seq = 11,
type = "request"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:804 ] "request" {
arguments = {
variablesReference = 1004
},
command = "variables",
seq = 12,
type = "request"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:804 ] "request" {
arguments = {
variablesReference = 1005
},
command = "variables",
seq = 13,
type = "request"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:804 ] "request" {
arguments = {
variablesReference = 1006
},
command = "variables",
seq = 14,
type = "request"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:804 ] "request" {
arguments = {
variablesReference = 1003
},
command = "variables",
seq = 15,
type = "request"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:804 ] "request" {
arguments = {
variablesReference = 1004
},
command = "variables",
seq = 16,
type = "request"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:804 ] "request" {
arguments = {
variablesReference = 1005
},
command = "variables",
seq = 17,
type = "request"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:804 ] "request" {
arguments = {
variablesReference = 1006
},
command = "variables",
seq = 18,
type = "request"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
variables = {}
},
command = "variables",
request_seq = 11,
success = true,
type = "response"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
variables = {}
},
command = "variables",
request_seq = 12,
success = true,
type = "response"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
variables = {}
},
command = "variables",
request_seq = 13,
success = true,
type = "response"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
variables = { {
evaluateName = "General Purpose Registers",
name = "General Purpose Registers",
value = "{rax:0x0000000000000000, rbx:0x0000000000000000, ...}",
variablesReference = 1007
}, {
evaluateName = "Floating Point Registers",
name = "Floating Point Registers",
value = "{fctrl:0x037f, fstat:0x0000, ftag:0x0000, ...}",
variablesReference = 1008
}, {
evaluateName = "Exception State Registers",
name = "Exception State Registers",
value = "{trapno:0x00000000, err:0x00000000, ...}",
variablesReference = 1009
} }
},
command = "variables",
request_seq = 14,
success = true,
type = "response"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
variables = {}
},
command = "variables",
request_seq = 15,
success = true,
type = "response"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
variables = {}
},
command = "variables",
request_seq = 16,
success = true,
type = "response"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
variables = {}
},
command = "variables",
request_seq = 17,
success = true,
type = "response"
}
[ DEBUG ] 2022-01-10T14:14:37Z+0800 ] ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:536 ] {
body = {
variables = { {
evaluateName = "General Purpose Registers",
name = "General Purpose Registers",
value = "{rax:0x0000000000000000, rbx:0x0000000000000000, ...}",
variablesReference = 1010
}, {
evaluateName = "Floating Point Registers",
name = "Floating Point Registers",
value = "{fctrl:0x037f, fstat:0x0000, ftag:0x0000, ...}",
variablesReference = 1011
}, {
evaluateName = "Exception State Registers",
name = "Exception State Registers",
value = "{trapno:0x00000000, err:0x00000000, ...}",
variablesReference = 1012
} }
},
command = "variables",
request_seq = 18,
success = true,
type = "response"
}
And the following is my configuration for the dap_install:
local dap_install = require("dap-install")
local dbg_list = require("dap-install.api.debuggers").get_installed_debuggers()
for _, debugger in ipairs(dbg_list) do
dap_install.config(debugger)
end
Thanks in advance!
I tried to install any of supported debugger but i get the following messages. I use the newest commit DAPInstall.nvim and nvim-dap except for ccppr_vsc.
...r/start/DAPInstall.nvim/lua/dap-install/core/install.lua:22: attempt to index field 'details' (a nil value) function: builtin#18 ...r/start/DAPInstall.nvim/lua/dap-install/core/install.lua:22: attempt to index field 'details' (a nil value)
seems like if the details options field inside the debugger is missing it bricks the program and installation won't happen
should be a easy fix
Hello, it seems that I am unable to install any debugger using DIInstall <debugger>
, it prints a message and then kills Neovim
My config:
use {
"Pocco81/DAPInstall.nvim",
config = function()
local dap_install = require("dap-install")
-- default values
dap_install.setup({
installation_path = vim.fn.stdpath("data") .. "/dapinstall/",
verbosely_call_debuggers = false,
})
dap_install.config("go_delve_dbg", {})
end
}
OS: Ubuntu 20.04
Neovim: 0.5.0+ubuntu2+git202108111755-7d2233fad-d569569c9-9cb9a8f8c~ubuntu20.04.1 (I use the unstable ppa)
Running DIList
immediately after installing results in the following:
ls: cannot access '/home/kevin/.local/share/nvim/dapinstall/': No such file or directory
[Process exited 2]
I don't think this is unreasonable given that I haven't installed anything yet so the directory doesn't exist, but it seems like it might be a better user experience to handle that case here and return an empty list?
I've been using this plugin along with nvim-dap=ui and I'm having serious issues getting this working on a very simple example.
I've put the settings to configure dap as mentioned in the README in ftplugin/python.lua
file: ftplugin/python.lua
local dap_install = require("dap-install")
dap_install.config(
"python",
{
adapters = {
type = "executable",
command = "python",
args = {"-m", "debugpy.adapter"}
},
configurations = {
{
type = "python",
request = "launch",
name = "Launch file",
program = "${file}",
pythonPath = function()
local vnv = os.getenv("VIRTUAL_ENV")
if vnv ~= nil and vim.fn.executable(vnv .. "/bin/python") then
return vnv .. "/bin/python"
else
return "/usr/bin/python"
end
end
}
}
}
)
I've created a hello_world python module, set a breakpoint, and called :lua require'dap'.continue()
After some time, that results in the following message:
Debug adapter didn't respond. Either the adapter is slow (then wait and ignore this) or there is a problem with your adapter or `python` configuration. Check the logs for errors (:help dap.set_log_level)
What am I doing wrong? How can I get this to be properly configured.
It is also worth noting that I tried to just run the debugger out-of-the-box after running DIInstall, but this failed, stating that python was not configured.
I'm new to neovim. It seems that typescript is not supported for jsnode?
Hello! I'm sorry, but I'm veeeery irritated how to setup this plugin.
If I start nvim-dap
, then I'm getting the following error messages:
No configuration found for `python`. You need to add configs to `dap.configurations.python` (See `:h dap-configuration`)
Here are my settings:
~/.config/nvim/init.vim
:
call plug#begin('~/.vim/plugged')
Plug 'mfussenegger/nvim-dap'
Plug 'theHamsta/nvim-dap-virtual-text'
Plug 'rcarriga/nvim-dap-ui'
Plug 'Pocco81/DAPInstall.nvim'
call plug#end()
source ~/.config/nvim/plugins/dap.vim
lua require("dapinstall")
~/.config/nvim/plugins/dap.vim
:
augroup NvimDap
autocmd!
au FileType dap-repl lua require('dap.ext.autocompl').attach()
augroup END
let g:my_dap_repl_is_open = v:false
function OpenRepl()
echo "called"
" open repl if it isn't opened yet
if !g:my_dap_repl_is_open
lua require('dap').repl.open()
let g:my_dap_repl_is_open = v:true
endif
lua require('dap').continue()
endfunction
nnoremap <F5> :call OpenRepl()<CR>
nnoremap <F6> :lua require('dap').step_over()<CR>
nnoremap <F7> :lua require('dap').step_into()<CR>
nnoremap <F8> :lua require('dap').step_out()<CR>
nnoremap <F9><F9> :lua require('dap').toggle_breakpoint()<CR>
nnoremap <F9><F10> :lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))<CR>
nnoremap <F9><F7> :lua require('dap').set_breakpoint(nil, nil, vim.fn.input('Log point message: '))<CR>
lua require("dap_conf")
~/.config/nvim/lua/dap.lua
:
local dap = require('dap')
local dap_ui = require('dapui')
dap.set_log_level('TRACE')
dap_ui.setup(
{
icons = {
expanded = "⯆",
collapsed = "⯈",
circular = "↺"
},
mappings = {
expand = "<CR>",
open = "o",
remove = "d"
},
sidebar = {
elements = {
-- You can change the order of elements in the sidebar
"scopes",
"stacks",
"watches"
},
width = 40,
position = "left" -- Can be "left" or "right"
},
tray = {
elements = {
"repl"
},
height = 10,
position = "bottom" -- Can be "bottom" or "top"
},
floating = {
max_height = nil, -- These can be integers or a float between 0 and 1.
max_width = nil -- Floats will be treated as percentage of your screen.
}
})
vim.g.dap_virtual_text = true
~/.config/nvim/lua/dapinstall.lua
local dap_install = require("dap-install")
dap_install.setup({
installation_path = "~/Apps/nvim-dap/",
verbosely_call_debuggers = false,
})
dap_install.config("python_dbg", {
adapters = {
type = "executable",
command = "python3",
args = {"-m", "debugpy.adapter"}
},
configurations = {
{
type = "python",
request = "launch",
name = "Launch file",
program = "${file}",
pythonPath = "python3"
}
}
})
dap_install.config("php_dbg", {})
I already did :DIInstall python_dbg
but it still says that I can't use the python debugger.
how to use iwth rust-tools.nvim?
I think it should be:
function M.get_debuggers()
return require("dap-install.core.debuggers_list").debuggers
end
${workspaceFolder}/${file} is not working for nodejs instead $(file) is working. I see that this was changed as part of #34
I am not using any custom config for DAP and nodejs adapter.
Environment1:
Macos 10.15
neovim 0.6.0
Environment2:
debian on wsl2
neovim 0.6
Both environments have the same issue. To test this out, created a file called testing.js and has a simple function which is put on setInterval to debug with a breakpoint inside function code.
Started with continue() and it kept giving error "Error on launch: Attribute 'program' is not absolute ('{path}')" same as in #34
Do I need to add some config related to workspace folders etc?
Here are parts of my nvim config related to dap
" Debugger
Plug 'mfussenegger/nvim-dap'
Plug 'theHamsta/nvim-dap-virtual-text' " cannot see virtual text if Treesitter for a language is not installed
Plug 'Pocco81/DAPInstall.nvim'
Plug 'nvim-telescope/telescope-dap.nvim'
" Debugger end
" Lua plugins initialization
lua << EOF
require('telescope').load_extension('dap')
local dap_install = require("dap-install")
dap_install.setup({
installation_path = vim.fn.stdpath("data") .. "/dapinstall/",
verbosely_call_debuggers = true
})
local dbg_list = require("dap-install.api.debuggers").get_installed_debuggers()
for _, debugger in ipairs(dbg_list) do
dap_install.config(debugger)
end
require("nvim-dap-virtual-text").setup() -- cannot see virtual text if Treesitter for a language is not installed
EOF
Have you considered adding the debug adapter one-small-step-for-vimkind for debugging Neovim plugins?
The README.md specifies this:
Returns table of available debuggers in which the key is the name of the debugger and the value is another table in which index
1
has name of the module whithin DAPInstall.nvim and index2
has the installation path.
but I don't think this works:
Haskell is a very strange language, and there is not an easy way to install the haskell-debug-adapter
. There are not any binaries like hls
has, so the only solution to install it is having stack
or cabal-install
and do the following:
stack install haskell-dap ghci-dap haskell-debug-adapter
and add the configuration to the dap.
The problem is that the end-user has to have a Haskell environment in place to run the above command and that the debugger will not end up in the path we have for other debuggers.
I m thinking of one of the following implementations:
stack install haskell-dap ghci-dap haskell-debug-adapter
ignoring the fact that the debugger will be on another location and considering that the user has already a properly haskell setup + add the configurations like the above implementation.What are your thoughts on that?
There's a chrome debugger though there is no firefox one.
nvim --version
NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compilé par [email protected]
Features: +acl +iconv +tui
See ":help feature-compile"
fichier vimrc système : "$VIM/sysinit.vim"
$VIM par défaut : "/usr/share/nvim"
Run :checkhealth for more info
While doing :DBInfo
:
Error detected while processing function <SNR>31_DBInfo:
line 1:
E5108: Error executing lua [string ":lua"]:1: attempt to index field 'info_window' (a nil value)
stack traceback:
[string ":lua"]:1: in main chunk
Press ENTER or type command to continue
This is the information after install python_dbg,seems going to the python2.7
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named venv
I tried to install using :DIInstall jsnode chrome python
, but on jsnode
is installed. A nice feature is to make the plugin more feasible and improve our UX.
Using dap_install.config
to configure the JavaScript debugger modifies dap.configurations.node2
but nvim-dap expects the configuration to be at dap.configurations.javascript
and won't launch the debugger.
I configured lldb-vscode, and found that lldb-vscode is a half-baked plan for cpp debug. When adding runInTerminal = true
option into configuration, the following error info will be reported.
Error info:
Timed out trying to get messages from the debug adaptor
If remove the option, nvim-dap is able to work properly.
On the other hand, more linux user may choose gdb rather than lldb. Other people also encountered a related problem in mfussenegger/nvim-dap#202
Getting this error on installing ccppr_vsc_dbg
on dev channel
OS: Windows 10
Steps to reproduce:
Install the plugin using packer
Set up following the docs:
local dap_install = require("dap-install")
dap_install.setup({
installation_path = vim.fn.stdpath("data") .. "/dapinstall/",
})
Run DIInstall
output:
Vim:E903: Process failed to start: no such file or directory: "/bin/bash" function: builtin#18 Vim:E903: Process failed to start: no such file or directory: "/bin/bash"
I just found that you rebranded the plugin DAPInstall.nvim
to dap-buddy.nvim
.
However, this breaks everything about previous dap_install
. An existing configuration will be broken and it looks like that you've changed a lot from DAPInstall.nvim
. No :DIInstall
commands any more, etc.. Well, I'm not sure such a sudden changing to a seemingly different project was a good idea; or you could've done that more carefully -- for example, rewrite might deserve a new repository where the previous one could still exist for an archival purpose. Or if it's still not fully complete yet, why not having them in a dev/unstable branch rather than main
? But I can do see and understand the rational you've got for this rebranding.
Anyway congratulations on the major refactoring and rebranding. Hope the new one is better than the older one. But I'm now completely lost how to use the new one. Is there any documentation/tracking issue/migration guide available? I cannot find any documentation/README at this point. Probably you are still working on that, but any information would be appreciated.
For now, I'll need to pin the plugin version at 24923c3, but look forward to myself migrating to the new one soon.
Hi mate, hope you're doing well!
As the title says I have this question regarding to C/C++ debuggers (in a more specific way with ccppr_vsc
one).
I saw those lines in the installation steps for ccppr_vsc
and this makes no sense to me due to
gdb
installed system-wide.gdb
compilation can be a bit slow and if we already have it system-wide we should be able to skip this step (this could optimize a ton the time to install this debugger).I know that providing everything ootb is great, but I feel like we don't really need to compile gdb from source if it's already installed system-wide. Maybe we can create a conditional with which gdb
and check for the exit code to know if we should compile gdb from source?
I wonder if we could have a command for synchronous installation of multiple adapters similar to TSInstallSync
for nvim-treesitter and CocInstall -sync
for coc.nvim. This would help automate installations.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.