gpt4 book ai didi

ios - XCode 同时调试主应用程序和今日扩展

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:56:34 26 4
gpt4 key购买 nike

我想同时获取主应用today-extension调试信息。

我运行 main app 方案,只得到 main app 调试信息。
我尝试通过 Process Identifier(today-extension id) 进行附加,但是当我选择 today-extension 进程时它是空白的。

我该怎么办?

最佳答案

Basically select the Watch App as the scheme in xcode, hit build+run which will build the iOS app and WatchKit app, install the WatchKit app on to the Watch and attach the debugger to the WatchKit Extension. Then in xcode select the iOS app in the scheme selector and select the iPhone as the target device, launch the iOS app by tapping the app icon on the phone and in xcode in the menu bar select "Debug > Attach to Process" and select your app in the list. This should result in having xcode attached to both processes at the same time. If you want to debug something early in the iOS app's lifecycle you can select "Debug > Attach to Process by PID or Name..." and type in the process name of the iOS app prior to launching it manually. This way the debugger will be attached right when the app launches.

来自 Apple 开发人员 site .

请注意,他们讨论了 WatchKit,但 Today Extension 也是如此。

关于ios - XCode 同时调试主应用程序和今日扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40198925/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com