I’ve been having occasional trouble with the debugger in Goland. Every attempt to debug a test would just fail with the following error:

/usr/local/go/bin/go tool test2json -t /Applications/GoLand.app/…
API server listening at: 127.0.0.1:60732
could not launch process: EOF

Debugger finished with the exit code 1

My previous attempts at fixing this — upgrading Go and Goland — did get it working for a while, but recently it’s been happening to me again. And being at the most recent version of Go and Goland, that avenue was not available to me.

So I set about looking for other ways to fix this. Poking around the web netted this support post, which suggested upgrading the Xcode Command Line tools:

$ sudo rm -rf /Library/Developer/CommandLineTools
$ xcode-select --install

I ran the command and the tools did upgrade successfully, but I was still encountering the problem. I then wondered if Goland used Delve for debugging, and if that actually need upgrading. I’ve got Delve via Homebrew, so I went about upgrading that:

$ brew upgrade dlv

And indeed, Homebrew did upgrade Delve from 1.21.0 to 1.22.0. And once that finished, and after restarting Goland1, I was able to use the debugger again.

So, if you’re encountering this error yourself, try upgrading one or more of these tools:

  • Goland
  • Go
  • Xcode Command Line tools (if on a Mac)
  • Delve

This was the order I tried them in, but you might be lucky by trying Delve first. YMMV


  1. Not sure that a restart is required, but I just did it anyway, “just in case”. ↩︎