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

Add basic GoDebugConnect command #3173

Merged
merged 1 commit into from
Mar 20, 2021

Conversation

EVODelavega
Copy link
Contributor

Just noticed this issue, and seeing as I'll probably need to connect to a container when debugging soon, I went ahead and added the suggested GoDebugConnect command. It's untested ATM, but thought I'd push it to see if this works (yay, testing in production).

@bhcleek
Copy link
Collaborator

bhcleek commented Mar 10, 2021

Thanks!

I think this won't quite work, but it's close. The listen address and maybe --headless are probably not relevant to connect.

I'll try to test in the next few days

@EVODelavega
Copy link
Contributor Author

@bhcleek I know this is most likely not the complete solution. I'm a bit swamped at my dayjob, but I expect to be needing some dlv debugging with containers in the next 1~2 weeks. I'm planning to use the opportunity to implement this properly, or at least document/update :GoDebugAttach in a way that would address the problems reported in the linked issue.

I've been using vim-go for years, so I'm all too happy to contribute.

@bhcleek
Copy link
Collaborator

bhcleek commented Mar 13, 2021

@EVODelavega I've been playing with this a bit and there's quite a bit more to do to make this work. I'm close to having a working solution, but I wanted to point out that if you're using Linux and the container you need to debug is on your same machine, then you can use :GoDebugAttach to attach to the process.

You can also use dlv connect at the commandline and use the CLI interface to debug. It's really not terribly onerous to do vs updating vim-go if this is a rare operation for you.

@bhcleek
Copy link
Collaborator

bhcleek commented Mar 13, 2021

@EVODelavega I have working implementation locally. Would you like for me to push to your branch, or open a separate PR for it?

@bhcleek
Copy link
Collaborator

bhcleek commented Mar 19, 2021

@EVODelavega do you want to give #3179 a try? It has your commit here, plus the required additional changes. I'm happy to close that out and push the changes to your branch if you'd prefer.

@bhcleek bhcleek merged commit fbe05b3 into fatih:master Mar 20, 2021
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

Successfully merging this pull request may close these issues.

2 participants