Lost connection to the debugger

Rathish Kannan
1 min readJun 29, 2021

Issue: disconnected all the time from the debugger

macOS: BigSur

Xcode: 12.3

Error:

Actual Error:

dating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated

Resolution:

Solution 1

  • After booting the desired simulator
  • Run below command in terminal
xcrun simctl spawn booted log config --mode "level:off"  --subsystem 
com.apple.CoreTelephony

If above does not resolve your issue, follow:

Solution 2

  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
  4. 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.

Reference:

--

--