Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging broken after MacOS Mojave Install #1398

Closed
tfnaylor opened this issue Nov 3, 2018 · 17 comments
Closed

Debugging broken after MacOS Mojave Install #1398

tfnaylor opened this issue Nov 3, 2018 · 17 comments

Comments

@tfnaylor
Copy link

tfnaylor commented Nov 3, 2018

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 -- install

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

@aarzilli
Copy link
Member

aarzilli commented Nov 3, 2018

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.

@tfnaylor
Copy link
Author

tfnaylor commented Nov 3, 2018

The /Library/Developer/CommandLineTools directory is essentially empty. See attached screenshot.
screenshot 2018-11-03 at 07 52 37 pm

@tfnaylor
Copy link
Author

tfnaylor commented Nov 3, 2018

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:

screenshot 2018-11-03 at 08 09 20 pm

@tfnaylor
Copy link
Author

tfnaylor commented Nov 3, 2018

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.

@tfnaylor tfnaylor closed this as completed Nov 3, 2018
@aarzilli
Copy link
Member

aarzilli commented Nov 3, 2018

Glad you figured it out.

@kuroneko
Copy link

kuroneko commented Nov 6, 2018

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}

@acardero
Copy link

At this point in time xcode-select --install is working fine and correctly fixes the error on the debugger.

@jongear
Copy link

jongear commented May 24, 2019

can also confirm that xcode-select --install solved my debugging issues with Go 1.12.5 on Mojave

@lzantal
Copy link

lzantal commented Jul 29, 2019

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.

@Arnie97
Copy link

Arnie97 commented Oct 11, 2019

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.

@aallbrig
Copy link

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 🥳

@tclemos
Copy link

tclemos commented Feb 3, 2021

Here we are again with MacOS Big Sur 11.2 (20D64).
Just updated and it broke my VSCode debugging.
xcode-select --install fixed the problem
go version go1.15.7 darwin/amd64

@mghifariyusuf
Copy link

xcode-select --install still work fine for me!
Updated to Big Sur and have go version go1.16.6 darwin/amd64

@s0xzwasd
Copy link

xcode-select --install fixed the problem after updating to Monterey.

@ganesh-getweave
Copy link

xcode-select --install fixed the problem after updating to Monterey 12.5.1.

@brunoluizkatz-NETZSCH
Copy link

xcode-select --install fixed the problem after updating to Venture 13.0.1 (22A400)

@axilis-marko
Copy link

I have upgraded to Venture 13.1 (22C65) and I'm getting Can’t install the software because it is not currently available from the Software Update server. after running xcode-select --install. The https://developer.apple.com/download/more/ is asking for Apple ID sign in.

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

No branches or pull requests