dlv version)?$ dlv version
Delve Debugger
Version: 1.0.0-rc.1
Build: $Id: b6077a6a35c48a31716aad2ad3fdf77bbdf70abd $
go version)?$ go version
go version go1.9.1 darwin/amd64
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.12.3
BuildVersion: 16D32
$ go get -u github.com/derekparker/delve/cmd/dlv
$ dlv exec k6 run samples/http_2.js
What did you expect to see?
The Go debugger
What did you see instead?
could not launch process: exec: "lldb-server": executable file not found in $PATH
You either need lldb-server in $PATH or debugserver at /Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/debugserver, which should be installed with xcode command line tools.
This error can show up for Mac users using delve of version 0.12.2 or above. Not sure why, but doing a xcode-select --install has solved the problem for users who have seen this issue.
in here
this fix my issue.
This isn't really a Delve issue but perhaps the error message could be improved.
Also adding this to "Installation" page would be helpful.
This seems to be standard problem with macos users.
Reference to xcode-select --install is already in the "manual install" section of the docs: https://github.com/derekparker/delve/blob/master/Documentation/installation/osx/install.md#manual-install
On macOS with Xcode, without installing a standalone CLT, I used
sudo mkdir -p /Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/
sudo ln -s "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver" /Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/debugserver
It is hard-coded in gdbserver.go around L370, I think it should also find the executable come with Xcode.
Would be a nice enhancement. I am using dlv through JetBrains goland IDE and thought the error was wrong since CLT is updated/managed when Xcode is installed.
@unknownzerx since your comment the line has changed from 370 to 302 in gdbserver.go
On macOS with Xcode, without installing a standalone CLT, I used
sudo mkdir -p /Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/ sudo ln -s "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver" /Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/debugserverIt is hard-coded in
gdbserver.goaround L370, I think it should also find the executable come with Xcode.
This worked for me!! Many thanks.
On macOS with Xcode, without installing a standalone CLT, I used
sudo mkdir -p /Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/ sudo ln -s "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver" /Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/debugserverIt is hard-coded in
gdbserver.goaround L370, I think it should also find the executable come with Xcode.
Good stuff, thanks
Most helpful comment
On macOS with Xcode, without installing a standalone CLT, I used
It is hard-coded in
gdbserver.goaround L370, I think it should also find the executable come with Xcode.