Simulator frozen while Xcode debugger attached

I'm on Xcode 16.3 (16E140), using iPhone 16 Pro Simulator with iOS 18.4, on macOS Sequoia 15.4.

Today is the first time using this particular configuration. On Friday I was using Xcode 16.2, simulator on 17.5, macOS 15.3.2.

This morning while running the app in the debugger I get times where I pause in using the app, perhaps to look up some information or make some notes, then go back to the simulator and nothing works. It is just frozen. Tap tap tap all day long and nothing responds.

In the Xcode console I get this over and over while the simulator doesn't respond.

nw_protocol_socket_set_no_wake_from_sleep [C100.1.1:2] setsockopt SO_NOWAKEFROMSLEEP failed [22: Invalid argument]
nw_protocol_socket_set_no_wake_from_sleep setsockopt SO_NOWAKEFROMSLEEP failed [22: Invalid argument]

I then hit the "Stop" button in Xcode debugger and get this in console

<0x10843a0b0> Gesture: System gesture gate timed out.
XPC connection interrupted
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.

The Simulator springs to life immediately. It even seems to have queued up my most recent inputs and happily accepts them and processes them as normal.

So far, I'm not seeing this problem with

Xcode 16.3 (16E140)
iPhone SE Simulator 17.5
macOS 15.4

It is happening on iOS simulator 17.5 today as well. The attached app acts frozen? very very very very slow? I can navigate the simulator OS and open other apps, which are responsive. The literal second I stop debugging, the app I'm working on starts moving again as normal..

Hi,

Any luck with this? I'm having very similar issues.

  • Xcode 16.2
  • iOS/iPadOS 18.3.1 simulators
  • macOS 15.4

It works (somewhat) fine until I enable breakpoints. Once I enable breakpoints, breakpoints take minutes to trigger, pausing execution won't respond, debugged app is frozen in simulator. When bp does get triggered, variable inspector seems to contain only defaults values (uninitialized data, lots of nil pointers) despite using p <variable> showing otherwise.

I tried reinstalling Xcode (deleted most of the local and user Developer folders including simulators, caches, runtimes, except old archives and user data), rebooting serveral times. I might try going back to Xcode 16.0 when I find some time...

Same problem with Xcode 16.3, iOS 18.3.1 simulator and macOS 15.4 @gmorin

@gmorin I may have it behaving better now, but we'll see how it goes over the coming days. Unfortunately, I can't remember if this is everything I did. However, the main thing I absolutely know is I did was Device > Erase All Contents and Settings on the 18.4 Simulator.

When the Simulator came back up, I briefly saw it perform what appeared to be an update (?) of some sort. I'm sorry I didn't pay closer attention; I was doing that in the background while working on something else and didn't expect to see anything out of the ordinary.

But I'm quite certain an Xcode reinstall would not fix this, because I had done a full wipe of the hard drive with full OS reinstall (with applications like Xcode) just 24 hours prior.

(the OS reinstall was because of a macOS failed update that "bricked" my system, while we're on the topic of bad updates)

Thanks for your replies.

I found this similar issue and tried the solution on the last page (deleting a bunch of stuff, including caches and settings) but didn't have time to test it. I suspect it won't be enough though...

Simulator frozen while Xcode debugger attached
 
 
Q