-
Notifications
You must be signed in to change notification settings - Fork 757
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
debug: dlv dap remote debugging does not start anymore #1729
Comments
@debevv Remote debugging support is still a work in progress. As the dlv-dap graduates from its experimental stage, we removed the preliminary In your case, you need to connect the debug server running on a different host, right? Unfortunately, |
Thanks for your response. It's a pity because it used to work very well. |
@hyangah I tried going back to the legacy adapter, but I quickly dismissed it since I never found a decent way to integrate it seamlessly with vsocde in my use case (lots of scripting and babysitting because dap must be started at every debugging session etc.). That Anyway, I found a nice workaround for remote debugging with DAP. Since the adapter can now connect only to localhost, i created an SSH port forwarding to my embedded device, like this:
and set I'm ok for now, but in the future It would be nice to have the possibility to specify the |
Thanks for understanding and working around the issue @debevv. I noticed that your use case is a bit different from the use case we've focused on (i.e.
@suzmue I think if the @debevv This is an interesting use case and I want to understand better. You said:
How did you handle it when you used the legacy debug adapter? I thought you had to restart the headless |
@hyangah with the legacy adapter I use this configuration: {
"name": "repr legacy remote",
"type": "go",
"request": "attach",
"mode": "remote",
"remotePath": "",
"port": 2345,
"host": "192.168.1.26",
"cwd": "${workspaceFolder}",
"preLaunchTask": "delve-legacy",
} The
Along with other tasks' settings I managed to create a somehow acceptable, but very brittle, setup. One of the problems is that console management is very shaky, sometimes i don't get the application log, or it doesn't show automatically etc. On the other hand, with DAP i just start delve on the remote machine at the beginning of my work day: while true; do dlv dap --listen=0.0.0.0:12345; sleep 1; done I use a while loop because delve exits when the program being debugged is terminated. And use this config (new one, with SSH port forwarding): {
"name": "repr DAP remote",
"type": "go",
"request": "launch",
"debugAdapter": "dlv-dap",
"debugServer": 12345,
"mode": "exec",
"program": "/usr/bin/repr",
} (I omitted from both configurations the preLaunchTask I use to build and copy the program on the remote device before debugging) You may be asking: why don't I use the I hope i answered your question. Otherwise i can send you all the script files involved in my dev setup |
Thanks for sharing your use case! We plan to add back in support for this as soon as we can. |
Change https://golang.org/cl/346269 mentions this issue: |
@debevv I am glad to hear about this use case as well! Thank you for explaining. We were going back and force on whether this new version had its own merits (as opposed to the legacy configuration, which we also plan to support with dlv-dap), and this issue is giving us a much needed insight into how people use these configurations. |
…remote" This reverts commit 45b06e0. Reason for revert: issue #1729 shows a use case for including this option. We will instead issue a warning that the host and port are being used. Updates #1729 Change-Id: Iea1b96f034caf3517221b3b6b267d7a829d0f652 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/346269 Trust: Suzy Mueller <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]> Reviewed-by: Polina Sokolova <[email protected]>
Change https://golang.org/cl/346270 mentions this issue: |
@polinasok you are welcome, my only gripe was the recent removal of the |
This change needs to go in after the revert lands. Updates #1729 Change-Id: I4ea882b69894143e7bc5353ca54b11112631cdf9 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/346270 Trust: Suzy Mueller <[email protected]> Run-TryBot: Suzy Mueller <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
The fix should be available in the Go Nightly. @debevv We plan to release a new version with Suzy's fix near future, but if possible, can you try the Nightly and see if it has everything you need? Thanks! |
The fix is now picked up for v0.28.0 RC. Closing. |
Change https://golang.org/cl/352056 mentions this issue: |
During release, part of the fix was dropped. Restored the fix by copying the snapshot of the repo at master before release (171cc61) and pick cfee3e1 the main fix intended for v0.28.1. Updates #1729 Change-Id: I54728fa5d11903967a62004bddd6016b43a56dae Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/352056 Trust: Hyang-Ah Hana Kim <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Suzy Mueller <[email protected]> Reviewed-by: Rebecca Stambler <[email protected]>
Hi, in this comment of another issue #1647 (comment) I managed to create a correct configuration for remote debugging with delve DAP on a ARM system.
The configuration worked correctly for a while, but lately It stopped doing so.
Specifically, after running the configuration I see vscode opening a TCP connection to the dlv server on the remote machine, but then not sending any additional packet. On the ui i see the debugging commands panel appear, and the blue progress bar spinning forever.
I tried to enable verbose logging on both sides, but with no result.
Were some changes made that should be reflected in my conf?
The text was updated successfully, but these errors were encountered: