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.

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

Lost connection to the debugger
 
 
Q