0

当我在 iOS 扩展中调试代码时。我面临一些崩溃EXC_BREAKPOINT

我做了什么?

  1. 使用 Xcode 11.5 运行我的应用程序。
  2. 开始调试扩展:Debug-> Attach to Process by PID or name->Input my Extension name and click Attach Button
  3. Extension code在(我的是UNNotificationServiceExtension)中设置一些断点
  4. 最小化APP。
  5. 推送通知。
  6. 触发我设置的断点。
  7. 继续调试。然后我看到了这个崩溃。

我的问题是如何在我的情况下调试扩展?

4

1 回答 1

2

这可能是 Xcode 的一个错误。我通过在第二次推送通知设置断点来修复它。所以步骤是:

  1. 使用 Xcode 11.5 运行我的应用程序。
  2. 开始调试扩展:Debug-> Attach to Process by PID or name->Input my Extension name and click Attach Button
  3. 最小化APP。
  4. 确保扩展代码中没有断点。
  5. 推送通知。
  6. Extension code在(我的是UNNotificationServiceExtension)中设置一些断点
  7. 推送通知。
  8. 触发我设置的断点。
  9. 继续调试。它工作正常。
于 2020-08-28T16:26:13.583 回答