While debugging any iOS application, Xcode builds and run successfully, also launches a simulator but it is not able to attach debugger from Xcode 14 to Simulator iOS app.
It throws an error in Xcode:
Xcode console says:
Could not attach to pid : “75997” Domain: IDEDebugSessionErrorDomain Code: 3 Failure Reason: attach failed (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.) User Info: { DVTRadarComponentKey = 855031; IDERunOperationFailingWorker = DBGLLDBLauncher; RawUnderlyingErrorMessage = "attach failed (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.)"; }
Tried with re-installing Xcode and Command line tools, but issue persists.
Steps:
Is there a possibility that it can be blocked by any other app, if so how to identify ?
There was on security software installed in machine which was blocking this simulator to attach.
To get more information, when we receive that alert we should check in Console.app for our Simulator app process id and notice issues/errors.
After uninstalling that app, this issue is resolved and able to attach app through debug mode.