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

Configuration for golang remote attach (kube pod) #104

Open
venkateshks opened this issue Apr 25, 2024 · 3 comments
Open

Configuration for golang remote attach (kube pod) #104

venkateshks opened this issue Apr 25, 2024 · 3 comments

Comments

@venkateshks
Copy link

venkateshks commented Apr 25, 2024

Hi,
I need to make dape attach to a remote dlv session which has a local tunnel at port 40000. I tried the following configs to attach to, but without any success. If anyone has a working config OR if you have some ideas on how to make this work please let me know. The former uses the vscode debugAdapter, the latter is an attempt to use dape's default, perhaps dlv based adapter.
The latter attaches to the tunnel, but doesnt trigger the dap adapter, rather directly attaches.

(add-to-list
   'dape-configs
   `(delve-remote-new-headless26
     modes (go-mode go-ts-mode)
     command "node"
     command-args ("/Users/xxx/.emacs.d/debug-adapters/extension/dist/debugAdapter.js")
     :request "attach"
     :mode "remote"
     :type "go"
     :debugAdapter: "dlv-dap"
     :port 40000
     :showLog "true"
     :substitutePath [(:from "/Users/xxx/src/project/" :to "/src/project/")]
     ))
  (add-to-list
   'dape-configs
   `(delve-remote-new-headless3
     modes (go-mode go-ts-mode)
     hostname "localhost"
     port 40000
     :request "attach"
     :mode "remote"
     :type "go"
     :port 40000
     :showLog "true"
     :substitutePath [(:from "/Users/xxx/src/project/" :to "/src/project/")]
     ))
@svaante
Copy link
Owner

svaante commented May 18, 2024

Hey sorry for the late response, I have not gotten dlv attach to process with pid to work on my machine, so I can't test it with dape.

But if it's not an requirement to attach to process but if its fine that dape starts the process #109 (comment) will work.

@venkateshks
Copy link
Author

Thanks, It is a requirement to attach. If there is some pointers, I can try to help with a PR. I would like to try vscode debugadapter and dlv and see which works

@svaante
Copy link
Owner

svaante commented May 26, 2024

Your contributions are highly appreciated!

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