Lost connection to the debugger on iPhone simulator running Big sur11.4

Viewed 834

I have face the issue while running my app on Big sur 11.4.While run the app I got "Build succeeded" message but after app is automatically stops then showing a popup message like

Lost connection to the debugger on “iPhone 12”.
Domain: IDEDebugSessionErrorDomain
Code: 4
Recovery Suggestion: Restore the connection to “iPhone 12” and run “APP_TARGET_NAME” again, or if “APP_TARGET_NAME” is still running, you can attach to it by selecting Debug > Attach to Process > APP_TARGET_NAME.
--


System Information

macOS Version 11.4 
Xcode 12.1 (17222)

Please help me how to resolve the issue.

2 Answers

This usually happens with apps with lots of dependencies so they take too long to launch, making the debugger to abort and time out.

A temporary solution would be:

  • Create (or edit in case you already have) a .lldbinit file in your home directory. vim ~/.lldbinit.
  • Add this to the end of file: settings set plugin.process.gdb-remote.packet-timeout 300.
  • Restart Xcode and try again.

I have tried this way and it is working like uncheck debug executable option.

Choose Edit Schema->Info->uncheck Debug executable

Related