Debugger: Xcode has killed the LLDB RPC server to allow the debugger to detach from your process. You may need to manually terminate your process
Asked Answered
B

3

11

Message from debugger: Xcode has killed the LLDB RPC server to allow the debugger to detach from your process. You may need to manually terminate your process.

I keep running into errors when trying to run Xcode projects. The first one involved a code signing issue and after fixing that I am now running into this debugging issue. I never had issues like this before but once I upgraded by iPhone to 15.6.1 is when these issues started to occur. This happens to every application I attempt to run.

Could someone please explain what this message means and if they have any solutions to how I can solve this?

Burger answered 6/9, 2022 at 18:26 Comment(0)
I
12

This happens when the process of attaching the debugger to the new process goes too slowly and Xcode thinks lldb is stuck. One common cause of that for remote debugging is if there's no "host side" copy of the system libraries that are loaded into your binary on the phone. iOS applications are really complex these days, with lots of shared libraries and lots and lots of symbols. lldb has to read them all since you might want to put a breakpoint on any one of them.

The debugging protocol lldb uses has the advantage of ubiquity but it wasn't designed for high speed data transfer. When lldb has to read all that symbol information from the process being debugged, that goes pretty slowly.

Xcode gets around this by copying the system libraries from your device to a cache on the host Mac, putting them in a place lldb knows to look for them. It has to do that every time it sees a device with a new OS. It sounds like that process has failed.

The cache is stored on the Mac you are debugging from in:

~/Library/Developer/Xcode/iOS Device Support/<OS Version>

There might be no directory for your 15.6.1, or there may be one, but it doesn't actually have all the files. You can often fix this by deleting the <OS Version> directory in the Device Support, and then unplugging and re-plugging in your device. The next time Xcode runs you should see some message about "preparing device for debugging" - which is it copying these files over. If that still doesn't work, it's best to file a bug with the Apple BugReporter so we can look into it more deeply.

Inductee answered 6/9, 2022 at 21:17 Comment(4)
YES! Thank you this worked, you're a life saver!! I was pulling my hair trying to fix these issues for the past month.Burger
I still don't understand what the resolution is!?Turnover
I don't understand what is resolution too + what if this happens with simulator?Chalet
The resolution is if this is device debugging, follow the instructions I gave to delete the Device Support files and try plugging the device in again and see if the copy works this time. If that doesn't fix the problem or you are seeing this in the simulator, then you have run across some other problem. That error is a pretty general chokepoint covering a wide variety of failures, and it will require some more info to figure out what your particular issue is. In that case, it's probably best to file a Feedback report as that's a more efficient way to gather that info.Inductee
E
0

I have found that sometimes its an error on info.plist. Double check if you changed something there. Tip: If you run "flutter build ios" in Android studio it can retrieve the error more accurate than xcode.

Endymion answered 24/1 at 0:58 Comment(0)
B
0

Usually, you can solve this issue by restarting Xcode. If it doesn't work try disconnecting the device before restarting Xcode and connecting again.

Backing answered 1/5 at 15:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.