简体   繁体   English

与运行 Big sur11.4 的 iPhone 模拟器上的调试器失去连接

[英]Lost connection to the debugger on iPhone simulator running Big sur11.4

I have face the issue while running my app on Big sur 11.4.While run the app I got "Build succeeded" message but after app is automatically stops then showing a popup message like我在 Big sur 11.4 上运行我的应用程序时遇到了这个问题。运行该应用程序时,我收到“构建成功”消息,但在应用程序自动停止后显示一条弹出消息,例如

Lost connection to the debugger on “iPhone 12”.
Domain: IDEDebugSessionErrorDomain
Code: 4
Recovery Suggestion: Restore the connection to “iPhone 12” and run “APP_TARGET_NAME” again, or if “APP_TARGET_NAME” is still running, you can attach to it by selecting Debug > Attach to Process > APP_TARGET_NAME.
--


System Information

macOS Version 11.4 
Xcode 12.1 (17222)

Please help me how to resolve the issue.请帮助我如何解决问题。

This usually happens with apps with lots of dependencies so they take too long to launch, making the debugger to abort and time out.这通常发生在具有大量依赖项的应用程序中,因此它们需要很长时间才能启动,从而使调试器中止并超时。

A temporary solution would be:临时解决方案是:

  • Create (or edit in case you already have) a.lldbinit file in your home directory.在您的主目录中创建(或编辑)a.lldbinit 文件。 vim ~/.lldbinit . vim ~/.lldbinit
  • Add this to the end of file: settings set plugin.process.gdb-remote.packet-timeout 300 .将此添加到文件末尾: settings set plugin.process.gdb-remote.packet-timeout 300
  • Restart Xcode and try again.重新启动 Xcode 并重试。

I have tried this way and it is working like uncheck debug executable option.我已经尝试过这种方式,它就像取消选中调试可执行选项一样工作。

Choose Edit Schema->Info->uncheck Debug executable选择Edit Schema->Info->uncheck Debug executable

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM