After installing MacOS Mojave and all updates, I can no longer debug from a go test file. I get the following error in the debug terminal (Visual Studio Code Version 1.28.2):
could not launch process: debugserver or lldb-server not found: install XCode's command line tools or lldb-server
I have re-installed the updated xcode and also ran xcode-select --鈥奿nstall
I have updated delve using go get -u github.com/derekparker/delve/cmd/dlv
I am using go 1.11 (worked before Mojave install) on MacOS Mojave 10.14.1 (18B75).
I have a Macbook Pro Retina 2016
We look for debugserver at /Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/debugserver if mojave moved it somewhere else we'd need to know where it is.
The /Library/Developer/CommandLineTools directory is essentially empty. See attached screenshot.

After more banging at this, it seems that the Mojave installation removed the command line tools altogether and you can only install full xcode from the xcode-select --install command. Attempting to install the command line tools alone gives you a popup dialog like this:

Problem solved. It seems you have to download the updated command line tools from the Apple developer website (xcode-select --install) is broken for the latest MacOS Mojave version (10.14.1).
https://developer.apple.com/download/more/
After downloading and installing the tools from the web site, debugging is working again.
Glad you figured it out.
The path has in fact changed in Mojave - LLDB.framework is no longer in PrivateFrameworks, but in the Xcode bundle, so <xcodepath>/Contents/SharedFrameworks/LLDB.framework/Resources/{debugserver,lldb-server}
At this point in time xcode-select --install is working fine and correctly fixes the error on the debugger.
can also confirm that xcode-select --install solved my debugging issues with Go 1.12.5 on Mojave
This issue helped me as well after all these months. Mojave upgrade wiped my Xcode cmd tools 馃槼
Running xcode-select --install worked like a charm. I did have to fully restart vscode for debugging to start working.
Thanks, this solution also applies to macOS Catalina install / upgrade. I just upgraded my mac from Mojave to Catalina and got exactly the same issue.
Just as another datapoint: running xcode-select --install after doing a macOS Catalina (10.15.4) upgrade resolve an issue where Goland (2020.1.2) was unable to attach to the debugger service, thereby rendering the debug functionality unusable.
Goland is once again able to attach to the debugger service and I'm happily returning to debugging go code 馃コ
Most helpful comment
Problem solved. It seems you have to download the updated command line tools from the Apple developer website (xcode-select --install) is broken for the latest MacOS Mojave version (10.14.1).
https://developer.apple.com/download/more/
After downloading and installing the tools from the web site, debugging is working again.