Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Debugger hangs in OSX #269

Closed
lennykean opened this issue Mar 25, 2016 · 8 comments
Closed

Debugger hangs in OSX #269

lennykean opened this issue Mar 25, 2016 · 8 comments

Comments

@lennykean
Copy link

It happens on all code. When I start the debugger, it looks like its starting but just hangs. I don't get any errors, and there is nothing in the debug console.

Go: 1.6
Delve: v0.11.0-alpha
VS-Code: 0.10.11
vscode-go: 0.6.30

@lukehoban
Copy link
Contributor

Could you try updating to the latest vscode-go (currently 0.6.35)? There were some fixes for recent breaking changes in the VS Code debugger which may be what you are hitting.

@lennykean
Copy link
Author

I updated to 0.6.35 I'm still getting the hanging, but now I have some information in the debug console

2016/03/25 17:42:56 debugger.go:61: launching process with args: [./debug] could not launch process: could not fork/exec

@lukehoban
Copy link
Contributor

Sounds like you possibly haven't installed Delve according to the instructions: https://github.com/derekparker/delve/blob/master/Documentation/installation/osx/install.md? The could not launch process: could not fork/exec error is the standard one I've seen when dlv is not signed. (Delve error messages should definitely be more helpful around this...)

@lennykean
Copy link
Author

Ah, it was delve. Thanks for pointing me in the right direction. I had to set trust levels higher on my cert before signing. Thanks!

@ctaggart
Copy link

This is pretty easy to get wrong on the Mac with so many manual steps. I missed the step to set Code Signing to Always Trust.

In keychains select “System”, and you should find your new certificate. Use the context menu for the certificate (not the public or private keys), select “Get Info”, open the “Trust” item, and set “Code Signing” to “Always Trust”.

image

After enabling that and making the dlv executable again, debugging is working. :-)

@jb-san
Copy link

jb-san commented Apr 20, 2016

I am having the same problem, have followed the install instructions for delve, and no errors when CERT=dlv-cert make install, but i also get the 2016/04/20 14:58:00 server.go:38: Using API v1 2016/04/20 14:58:00 debugger.go:61: launching process with args: [./debug] could not launch process: could not fork/exec any ideas ?

@lennykean
Copy link
Author

I had a lot of issues getting that to work too. Make sure you are setting the trust levels high enough before you sign it. And it may take multiple tries. It's really a delve issue. You'll see the same problem if you run dlv manually.

@lukehoban
Copy link
Contributor

Yeah - installing Delve on OS/X is unfortunately still a manual process. @steeve just shared a HomeBrew formula that may help folks https://github.com/derekparker/delve/issues/508, and @derekparker is working on producing signed binaries out of the Delve release process https://github.com/derekparker/delve/issues/494. These should help here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants