swift - 与运行 Big sur11.4 的 iPhone 模拟器上的调试器失去连接
问题描述
我在 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)
请帮助我如何解决问题。
解决方案
这通常发生在具有大量依赖项的应用程序中,因此它们需要很长时间才能启动,从而使调试器中止并超时。
临时解决方案是:
- 在您的主目录中创建(或编辑)一个 .lldbinit 文件。
vim ~/.lldbinit
. - 将此添加到文件末尾:
settings set plugin.process.gdb-remote.packet-timeout 300
. - 重新启动 Xcode 并重试。
推荐阅读
- python - 将物理地址转换为地理位置纬度和经度
- sql-server - 将表中以不同模式开始和结束的多个字符串连接到一个新字段中
- installation - 在 Inno Setup 中安装之前检测重启是否挂起
- c# - Unity C# System.Xml.Linq - XDocument 更改 XML 声明中的编码
- javascript - 如何使用 cookie 来记住 html 中的按钮切换或类?
- javascript - 反应和处理异步状态
- docker - volumes_from 指令 - docker compose
- sql-server - CONVERT 和 CAST 创建平面视图 - 无法将 nvarchar 转换为数字
- android - 我该如何修复“ava.lang.IllegalArgumentException:无效的 Region.Op - 只允许 INTERSECT 和 DIFFERENCE”
- sql - 从 SQL 和 VIEW 中选择的 Oracle 区别