Debug Failed in Xcode Simulator

I can‘t use breakpoints on the simulator after updating Xcode and the simulator. I can use breakpoints on a physical iPhone. I tired to download other iOS simulator version, but still not working. Both SwiftUI and UIKit not working.

Xcode version: 16.2

SDK version: 18.2 (22C146)

Simulator version: 18.3.1 (22D8075)

Mac OS version: 15.4 Beta

Couldn't find the Objective-C runtime library in loaded images.
Message from debugger: The LLDB RPC server has crashed. You may need to manually terminate your process. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log.
Answered by zacJI in 827624022

I upgraded my system to 15.4 beta2 today and the problem was solved.

Updating to 15.4.1 fixed the issue with xcode 16.2!

Tentatively, updating to 15.4.1 seems to have fixed this issue with Xcode 16.0 as well.

I tried uninstalling and removing all Xcode installations, caches, caches etc and reinstall them. Nothing helped.

I'm on macOS 15.4.1 (24E263) and am required to use Xcode 16.2. Build and run works, but if I set up a breakpoint the debugger disconnects with the following error

Couldn't find the Objective-C runtime library in loaded images.

My solution was to install a VM running 15.3.2 and install Xcode 16.2 in this environment. I used VirtualBuddy to install my VM, but I'm sure there are other options out there.

I experienced the same issue in my environment (XCode 16.2, Intel MBP, iOS Simulator). However after getting "Couldn't find the Objective-C runtime library in loaded images" at the first breakpoint, manually attaching the debugger allowed subsequent breakpoints to function properly. Therefore, I'm using the following workaround by running without a debugger and attaching manually:

  • Product > Scheme > Edit Scheme...
  • Choose "Run" from left pane.
  • In the "Info" tab of right pane, uncheck "Debug executable"
  • Run Application
  • Debug > Attach to Process > (Choose Your Simulator from the top of the list)

Since I've just started using this method, I can't guarantee it will always work, but it might be helpful for debugging except for the very initial startup phase.

Debug Failed in Xcode Simulator
 
 
Q