go-delve / delve

Delve is a debugger for the Go programming language.
MIT License
22.84k stars 2.14k forks source link

Delve unable to launch process in Neovim or Command Line on M3 Apple Silicon #3681

Closed clm-whyte closed 7 months ago

clm-whyte commented 7 months ago

I'm very new to Go, so I'm absolutely willing to accept that I've messed something up here. However, I find it odd that debugging in VS Code works correctly. I wouldn't be wholly suprprised if it was something to do with me modifyiung the GOPATH from the default.

go env GOPATH
/Users/cmaciver-whyte/Projects/go

Error on launch: Failed to launch: could not launch process: stub exited while waiting for connection: exit status 0

I don't believe it's an issue with my Neovim config, as running dlv test in the command line results in the same error.

What did you see instead?

Error on launch: Failed to launch: could not launch process: stub exited while waiting for connection: exit status 0

aarzilli commented 7 months ago

You probably didn't follow the install instructions for macOS or you are debugging through ssh (which apple makes difficult) or there is a problem with your install of X-code. Closing, duplicate of #3056.

aarzilli commented 7 months ago

PS. you can also see the list of issues that reference back to #3056 for other possible problems that cause this.

clm-whyte commented 7 months ago

I've re-installed xcode-select, enabled DevToolsSecurity and added myself to the developer group. I'm not debugging through SSH, or at least not intentionally...I'm not even sure how I would do that.

Thanks for linking those issues, I'll take a look. But almost every resolution I saw before was to do with people using AMD64 instead of ARM.

FanchenBao commented 2 months ago

I ran into the same issue. What fixed for me was to migrate my Intel homebrew to Apple Silicone homebrew. See details here.