Xcode 11 hangs while attaching debugger to ios process

When I attempt to launch an app from Xcode 11 (gm seed 2) to my attached iPhone running iOS 13 the I see the app launch with a white screen but then the iOS process hangs for about *60 seconds* before the app finishes launching. If I un-check "debug executable" on the target then this behavior does not happen. If I launch the app on the phone directly (without xcode) it launches normally. If I launch the app on the phone and attempt to attach the debugger from xcode I get the same (one minute) hang.


This only happens on one of my machines even though both are using the same setup (only diff is that one is a laptop and one is a desktop). So I am assuming something is wrong or corrupted with the "debug support" that was installed on first connect to the new xcode... But I can find no reference to how to re-init that. I have tried the "unpair phone" option in devices in xcode but it does nothing. I don't see anything in settings related to developer profiles or debug symbols.


Anything I can do to reset the phone with respect to debgging support / symbols installed by xcode? Any other thoughts?


thanks,

Pat

I updated to Xcode 13.2 beta and I have this issue as well (macOS 11.5). Tried everything without success!

I have this issue randomly with Xcode 13.4.1 under macOS 12.4 on Apple Silicon, debugging a Mac app, not Rosetta. Breaking the app shows the main thread is stuck in a function called uniquing_table_stack_retain, underneath of an NSWindow function. The rest of the app is non-responsive. The only thing I've found to fix it is to completely terminate the debug session and hope the next one doesn't get stuck.

I should mention that my hangups mostly happen when debugging with full Guard Malloc and Malloc Scribble enabled for the run, which also has a huge impact on memory usage and allocation overhead, both used memory and time to allocate.

Well I have also this problem since Xcode 13.4.1 and WatchOS 8.7. Immediately when the Debugger reaches a breakpoint the lldb-rpc server crashes. Your workaround is not working, so I Hope that Xcode 14 will fix this problem

I'm on XCode 15.2, and it's also hanging while attaching the debugger.

It seems to happen sometimes (not all the time) when I switch between a wireless connection and a wired connection between XCode and my device. Probably when I lose my patience and plug in the cable while XCode is building/installing to the device.

The above steps alone did not work for me. I found that I also needed to shut down and restart my iPhone. So, here's what I do when this happens:

  • Close Xcode
  • Delete ˜/Library/Developer/Xcode/Derived Data
  • Delete ˜/Library/Developer/Xcode/iOS Device Support (note that I'm not deleting entire Xcode directory as that also deletes your archives)
  • Shut down Mac
  • Shut down iPhone
  • Restart iPhone
  • Restart Mac

Some of these steps are probably unnecessary, but as this doesn't happen too frequently for me, I just follow this to be on the "safe" side.

are you supposed to delete all folders in ~/Library/Developer/Xcode/iOS DeviceSupport/?

I have 4 iphone folder names.

Xcode 11 hangs while attaching debugger to ios process
 
 
Q