Instruments > device grayed out

2020-06-06 17:08发布

问题:

I'm running an app on my iOS device but, in Instruments, that device is greyed out.

This also means I can't attach the process (Cant launch iOS app with Instruments on device). Is it anything to do with my earlier question: Instruments > Profile - Revoke and request

Xcode: 6.1.1 iOS: 7.1.2

Any idea why?

回答1:

I only had to reboot my phone (not my Mac), and then the error went away (Xcode 9.2, iPhone X running 11.2.6).



回答2:

i was having this issue and resolved it by

  1. Unplugging my device
  2. Turning my device off
  3. Rebooted my mac
  4. Turned device back on and plugged into computer after logging back in.

now it shows up in instruments. I tried unplugging device, restarting xcode, but that didn't work. rebooting everything is what did the trick for me.



回答3:

I met the this problem. Xcode(Version 9.3.1 (9E501)), iphone 7, And I forcely quit the Instrument. It's work



回答4:

I came across same problem today on xcode7.2.1, iOS 9.2.1, iPhone 6Sp. Resolved by rebooted my mac, my watch and the iPhone.



回答5:

If your workspace contains several projects and/or several targets, it seems that XCode doesn't know which binary to profile.

Just Edit your scheme -> Profile -> Choose an Executable and it should enable the profiling option.



回答6:

I don't know which process helped but I force quit AppleMobileDeviceHelper and DTServiceHub in the Activity Monitor and then it started working again (I was able to select my phone without rebooting).



回答7:

Recently, I confronted the question again on Xcode Version 10.1 (10B61), iphone 7 and Mac 10.14.1 (18B75). I resolved it by upgrading the deployment from 8.0 to 10.1. In fact, I have meet many strange Xcode bugs caused by the version, liking this one(xcode gpu shader profiler)



回答8:

It turned out that my iPhone is not trusted my computer.

How to re-trust computers, see: https://www.wikihow.com/Trust-a-Computer-on-an-iPhone

In short, you should reset Location and Privacy in settings, and then plug-in your iPhone again. And you will see 'Trust this computer' again.



回答9:

I had the same problem where Profile was greyed out. It turned out to be I had the device option at the top set to Generic iOS Device

// this will make Profile greyed out

Once I switched it to an actual simulator device or my actual device Profile was no longer greyed out

One other option can be to in Xcode at the top go to Help > search Edit Scheme and select it > on the left side of the screen select Profile > change Executable drop down to your_project's_name.app