仪器无法连接到iPhone上正在运行的进程 [英] Instruments can't attach to running process on iPhone

查看:102
本文介绍了仪器无法连接到iPhone上正在运行的进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个用于临时分发我们产品的版本,并将其安装在我的设备上。现在,我想在运行的进程上运行时间分析器,但是Instruments无法将其附加到它。这是我尝试附加到iPhone上正在运行的进程时遇到的错误:

I created a build for ad-hoc distribution of our product and installed the same on my device. Now I want to run the time profiler on the running process but Instruments is unable to attach to it. This is the error that I get when I try to attach to a running process on the iPhone:

Target failed to run : Could not attach to process <app-name> (<pid>)

我也尝试了选择目标>应用程序名称,但也失败了并显示以下错误:

I also tried "Choose Target" > app-name but that too failed with the following error:

Target failed to run : Remote exception encountered : 'Failed to get task for pid <pid>'

以下是我的设置的详细信息:

Here are the details of my setup:


  • OS X 10.7.2

  • Xcode 4.2.1(内部版本4D502)

  • 仪器4.2(4233)

  • iPhone OS 5.0.1(内部版本9A405)

  • OS X 10.7.2
  • Xcode 4.2.1 (Build 4D502)
  • Instruments 4.2 (4233)
  • iPhone OS 5.0.1 (Build 9A405)

推荐答案

<我有同样的问题。我最初并没有解决它,但是一个简单的解决方法是自己启动该应用程序,然后从仪器窗口的目标菜单中的附加到处理...命令将其附加。

I had the same problem. I didn't solve it initially, but an easy workaround is to launch the app yourself and then attach to it from the "Attach to Process..." command in the Target menu in the Instruments window.


  1. 经过一些挖掘之后,这似乎是苹果开发者论坛上讨论的常见话题:仪器在带有设备的Xcode 4上不起作用

  1. After some digging around it seems this is a common topic of discussion on the apple developer forums: Instruments does not work on Xcode 4 with device

不同的Apple产品将更改/更新MobileDevice框架。其中一些更新破坏了Instruments的集成。

It appears that different Apple products will change/update the MobileDevice framework. Some of these updates break the Instruments integration.


  1. 要在自己的计算机上修复此问题,我安装了iTunes 10.5 beta v6。启动XCode,然后我就可以在设备上重新进行业务检测了。

  1. To fix this on my own machine, I installed the iTunes 10.5 beta v6. Fire up XCode, and I'm back in business Instrumenting on my device.

我建议本教程,因为它是解释如何使用乐器的更好的方法之一

I would recommend this tutorial since it is one of the better ones for explaining how to use Instruments

一开始可能会很混乱,但是花一些时间来了解它,以后会减轻很多麻烦。

It can be very confusing at first, but take the time to get to know it and it'll ease a lot of headaches later.

希望这些方法中的至少一种对您有用。

Hope atleast one of these approaches work for you.

这篇关于仪器无法连接到iPhone上正在运行的进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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