启动后如何将调试器附加到 iOS 应用程序? [英] How to attach debugger to iOS app after launch?

查看:37
本文介绍了启动后如何将调试器附加到 iOS 应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,我正在排除故障,该问题很少发生,而且在 Xcode 下运行时似乎不会发生.

I have an issue I am troubleshooting which occurs very infrequently and doesn't seem to happen when I have things running under Xcode.

是否可以在出现问题之前正常运行应用程序(即从 Springboard),然后在此时附加调试器?

Is it possible to run an app normally (i.e. from Springboard) until my issue occurs, and then attach a debugger at that point?

如果可能的话,我更愿意在不越狱的情况下执行此操作.

I would prefer to do this without jailbreaking if possible.

推荐答案

  • 将您的设备连接到 Mac
  • 调试 >按 PID 或名称附加到进程
  • 在对话框表中,输入通过 Xcode 启动时在 Debug navigator 中显示的应用程序名称(例如,目标名称不是 bundle-id).
    • Attach your device connected your Mac
    • Debug > Attach to Process by PID or Name
    • In the dialog sheet, enter the name of your App as it appears in the Debug navigator when started via Xcode (e.g. Target's name not bundle-id).
    • 如果应用程序已经在运行,调试器将附加到正在运行的进程.如果它没有运行,它将等待应用启动然后附加.

      If the app is already running, the debugger will attach to the running process. If it isn't running, it will wait for the app to launch and then attach.

      这篇关于启动后如何将调试器附加到 iOS 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆