-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
DAP server abruptly disconnecting #3825
Comments
It doesn't look like any breakpoints are being set and the program just
runs and terminates.
Il mar 8 ott 2024, 23:03 Trevor Whitney ***@***.***> ha
scritto:
…
1. What version of Delve are you using (dlv version)? 1.23.1
2. What version of Go are you using? (go version)? 1.23.2
3. What operating system and processor architecture are you using? Mac
OS 15.0.1
4. What did you do?
I tried to run a launch config for a main.go file with args, from
neovim, using nvim-dap and nvim-dap-go
5. What did you expect to see?
I expected to see the program launch, as it has for years.
6. What did you see instead?
The Dap server quit abruptly, nvim-dap logs
<https://gist.github.com/trevorwhitney/92c87013a9f83149506fec03d60a2b86>
and dap logs
<https://gist.github.com/trevorwhitney/152c616365fa3df34481ca6ccb54c713>
I don't understand why the DAP server is terminating, or how to get more
information to troubleshoot this?
—
Reply to this email directly, view it on GitHub
<#3825>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACKEBHYT4SPVJB7YW32WWLZ2RCDTAVCNFSM6AAAAABPTDYSKCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU3TIMRQHA3TCNA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
It's a server so it should just keep running until killed. I've tried setting breakpoints, and the DAP server still just terminates without ever hitting the breakpoint. Here's the output from that:
|
Did you try debugging something other than this program? Did you try debugging by calling |
Thanks for helping out on this, it's a huge hit to my workflow to not have a working debugger. Debugging from the command line (not using DAP) seems to work fine:
This produced a binary I was able to run with the same args and it came up fine. I've only ever used DAP with an editor. I tested out debugging in VSCode (which I understand uses delve's DAP protocol as well), and that worked. Is there an easy way to test the DAP functionality from the command line that you know of? |
I tried running the debugger on a trivial program and it worked
Up to this line, everything is the same. The working program prints |
That's irrelevant, it just prints that when it stops at a breakpoint.
You don't need to manually specify CGO_CFLAGS and -gcflags when calling dlv. What did you do exactly with the debugger called from the command line? |
@aarzilli thanks again for all your help on this, I think I finally got to the root of it and it doesn't seem to be related to For anyone else who finds themselves here. The project I was failing to run in the debugger was grafana/loki#14437 reverts |
dlv version
)? 1.23.1go version
)? 1.23.2I tried to run a launch config for a
main.go
file with args, from neovim, usingnvim-dap
andnvim-dap-go
I expected to see the program launch, as it has for years.
The Dap server quit abruptly, nvim-dap logs and dap logs
I don't understand why the DAP server is terminating, or how to get more information to troubleshoot this?
The text was updated successfully, but these errors were encountered: