Lost connection to the debugger

After updating Xcode to version 12.5 and using simulator 14.5, I'm getting disconnected all the time from the debugger. Please can someone help me?

I also get this: Domain: IDEDebugSessionErrorDomain Code: 4

Answered by dbug18 in 678730022

I talked to someone at Apple, and they gave me a temporary solution. As others already have said, larger apps with lots of dependencies are taking too long to launch. This is causing the debugger to abort and time out. To fix that, follow the steps:

  1. Create a file called .lldbinit on your home directory (~)
  2. Add this line to the file: settings set plugin.process.gdb-remote.packet-timeout 300
  3. Restart Xcode and try again

It's working fine after that.

anyone?

I am also having this issue. But I'm running an earlier version of Xcode (for reasons of unsupported frameworks).

Details

Lost connection to the debugger on “iPhone 12 Pro Max”.

Domain: IDEDebugSessionErrorDomain

Code: 4

System Information macOS

Version 11.4 (Build 20F71) Xcode 12.2 (17535) (Build 12B45b)

anyone solve this issue? if so, pls share your solution. Thank you

It's a bug with dyld. https://developer.apple.com/forums/thread/679098

Apple, pay attention on this. We can't debug in Xcode.

Same here, does anyone know how to fix it?

Accepted Answer

I talked to someone at Apple, and they gave me a temporary solution. As others already have said, larger apps with lots of dependencies are taking too long to launch. This is causing the debugger to abort and time out. To fix that, follow the steps:

  1. Create a file called .lldbinit on your home directory (~)
  2. Add this line to the file: settings set plugin.process.gdb-remote.packet-timeout 300
  3. Restart Xcode and try again

It's working fine after that.

18

Still not working for me. i am using ios software version 14.6 on iphone 7 and bigsur 11.4 and xcode version 12.4 (12D4e)

after i updated the 14.6 support, it started this issue. It will not detach the debugger now after i add the .lldbinit but still does not show the variables, it i just showing the loading progress.

Hardware Overview:

 Model Name: MacBook Pro  Model Identifier: MacBookPro16,2  Processor Name: Quad-Core Intel Core i7  Processor Speed: 2.3 GHz  Number of Processors: 1  Total Number of Cores: 4  L2 Cache (per Core): 512 KB  L3 Cache: 8 MB  Hyper-Threading Technology: Enabled  Memory: 16 GB  

Still not working for me. iOS 14.6 xCode 12.5 (12E262)

Symptoms: xCode "lost connection to the debugger" in few seconds after I activate the airplane mode on my iphone. The solution with the .lldbinit file doesn't work for me.

Suggestion by dbug18 worked for me. If the issue is not resolved for you try deleting derived data, format the simulator, do pod cache clean, restart the machine, and repeat the steps above.

Upgrading to 12.5.1 worked for me.

I submitted the patch in llvm https://reviews.llvm.org/D102833.

Use 'plugin.process.gdb-remote.packet-timeout' for now until llvm is released.

i too faced the problem, it was due to installing big sur on pre installed xcode on the machine it was resolved by removing xcode and installing the latest xcode

This is still an issue when I am trying to debug using XCode 12.4 (12D4e) and iPad Air 4th gen (2020) with iOS 14.7.1. I have tried the suggestion with .lldbinit file above, but does not work.

Apple, are you listening?

Connection lost if I connect iPhone iOS 16.5 via USB an use xcode 14.3.1 (14E300c)

Just replace the type-C cable. Then it works!

Lost connection to the debugger
 
 
Q