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 · 14 comments
Closed

Debugging broken after MacOS Mojave Install #1398

tfnaylor opened this issue Nov 3, 2018 · 14 comments

Comments

@tfnaylor
Copy link

@tfnaylor 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 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 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 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 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 aarzilli commented Nov 3, 2018

Glad you figured it out.

@kuroneko
Copy link

@kuroneko 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

@acardero acardero commented May 21, 2019

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

@jongear
Copy link

@jongear 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 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 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

@aallbrig aallbrig commented May 11, 2020

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

@mghifariyusuf mghifariyusuf commented Aug 16, 2021

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

@s0xzwasd
Copy link

@s0xzwasd s0xzwasd commented Oct 29, 2021

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

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