Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
1. Adds a note to the documentation describing how to use 'go get' in
   modules mode
2. Removes the '-u' option which, when 'go get' is used incorrectly
   will make 'go' try to compile Delve with unsupported dependencies
3. Removed obsolete note about Go 1.5 vendor experiment.

Fixes go-delve#1988
9 contributors

Users who have contributed to this file

@aarzilli @sbromberger @lumaxis @samv @derekparker @morenoh149 @jacobvanorder @gertcuykens @alanyee

Installation on macOS

Ensure you have a proper compilation toolchain.

This should be as simple as:

xcode-select --install

Now you can install delve using go get:

$ go get

Note: if you are using Go in modules mode you must execute this command outside of a module directory or Delve will be added to your project as a dependency.

With this method you will not be able to use delve's native backend, but you don't need it anyway: the native backend on macOS has known problems on recent issues of the OS and is not currently maintained.

If you didn't enable Developer Mode using Xcode you will be asked to authorize the debugger every time you use it. To enable Developer Mode and only have to authorize once per session use:

sudo /usr/sbin/DevToolsSecurity -enable

Compiling the native backend

Only do this if you have a valid reason to use the native backend.

  1. Run xcode-select --install
  2. On macOS 10.14 manually install the legacy include headers by running /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
  3. Clone the repo into $GOPATH/src/
  4. Run make install in that directory (on some versions of macOS this requires being root, the first time you run it, to install a new certificate)

The makefile will take care of creating and installing a self-signed certificate automatically.