它会在Xcode中抛出一个错误:
Xcode控制台显示:
无法附加到pid:“75997” Domain: IDEDebugSessionErrorDomain Code: 3 失败原因:附加失败(不允许附加到进程。当附加失败时,请查看控制台消息(Console.app)中的debugserver条目。拒绝附加权限的子系统可能已记录有关其被拒绝的原因的信息。)用户信息:{ 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.)”; }
尝试重新安装Xcode和命令行工具,但问题仍然存在。
步骤:
- 使用Debug可执行文件构建和运行应用程序
- 启动模拟器
- Xcode出现错误并与模拟器断开连接
是否有可能被其他应用程序阻止,如果是,如何识别?