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

Accepted Reply

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.

  • Thank you!!! Worked for me.

  • Thank you so much! It worked! I have been suffering and waiting to find a solution. THANKS!!!

  • This was bugging me for like 3 months now. Thanx a lot for this solution. Really. It's Working flawlessly. (I am on Xcode 12.3)

Replies

In Xcode Version 15.0 beta 5

  1. Create a file called LLDBInitFile in the SRCROOT folder (the folder containing the project)
  2. Add this line to the file: settings set plugin.process.gdb-remote.packet-timeout 300
  3. Restart Xcode and try again

In the Edit Scheme -> Run > Info Tab there is a field to locate the LLDBInitFile but is disabled.

Hi all,

I am seeing this issue when debugging an application built locally on my M2 Pro Mac.

When I go to run the application I am seeing the following error:

error: process exited with status -1 (lost connection)

I have tried the trick of adding settings set plugin.process.gdb-remote.packet-timeout 300 to ~/.lldbinit however this has not worked.

This works for small applications built using clang++ but a CMake project is not working.

Thanks