-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
Go (using delve directly) no output #232
Comments
I'll need a more detailed problem description to investigate or help |
Looks like recording.mp4Ideally they'd support the There isn't anything that can be done within nvim-dap about it :( |
Actually there is something you can do, you could redirect the output of dap.adapters.dlv_spawn = function(cb)
local stdout = vim.loop.new_pipe(false)
local handle
local pid_or_err
local port = 38697
local opts = {
stdio = {nil, stdout},
args = {"dap", "-l", "127.0.0.1:" .. port},
detached = true
}
handle, pid_or_err = vim.loop.spawn("dlv", opts, function(code)
stdout:close()
handle:close()
if code ~= 0 then
print('dlv exited with code', code)
end
end)
assert(handle, 'Error running dlv: ' .. tostring(pid_or_err))
stdout:read_start(function(err, chunk)
assert(not err, err)
if chunk then
vim.schedule(function()
--- You could adapt this and send `chunk` to somewhere else
require('dap.repl').append(chunk)
end)
end
end)
-- Wait for delve to start
vim.defer_fn(
function()
cb({type = "server", host = "127.0.0.1", port = port})
end,
100)
end You'll have to change the dap.configurations.go = {
{
type = 'dlv_spawn',
name = 'Launch dlv & file',
request = 'launch',
program = "${file}";
},
} You also have to be aware that the prompt buffer in neovim behaves a bit odd, and output is only visible if you enter it. |
thanks for you response, and it works. |
as subject, i m using nvim-dap-ui,but no every log output in repl panel.
The text was updated successfully, but these errors were encountered: