Reputation: 41470
I recently upgraded to Snow Leopard and since then I am having difficulty running Instrument to instrument my app from Xcode. The Record button would be grayed out, and nothing happens. There is no message in Xcode's console telling me what's wrong either. I used to be able to attach it to process or launch the process from Instruments as well, all these are no longer working.
Any idea what's causing this?
Upvotes: 13
Views: 15045
Reputation: 762
what worked for me was
Upvotes: 1
Reputation: 9871
As pointed out in Apple's discussion forum, restarting your machine works. It works for me.
Upvotes: 0
Reputation: 36257
The problem is instrument needs a gateway to your app and simply pointing to it doesn't do it. The Instrument's workflow is as such: You need to profile it from Xcode first.
If Instruments has access to information about your app’s source code, a leak is reported as a class name. Otherwise, a leak is reported as a memory address, such as Malloc-size. To ensure that Instruments has access to information about your code, initiate profiling from Xcode (see Profile from Xcode) or configure a symbol mappings file (see Map Data to Source Code).
Upvotes: 1
Reputation: 45408
I had this issue in Xcode 7. It turned out that, somehow, in the Profile section of my scheme settings, the Executable field had been cleared:
I set the Executable field to my target name and the menu enabled again.
Upvotes: 4
Reputation: 1628
Make sure all of your instruments support recording modes. When I upgraded from Xcode6 to Xcode7, one of my instruments was marked as "This instrument's supported recording modes are none". When I deleted this specific instrument, the recording button becomed enabled.
Upvotes: 0
Reputation: 2320
I've noticed that if I go to File->Record options, and press OK, the record button suddenly is enabled.
Upvotes: 0
Reputation: 5095
I was unable to get instruments to work with my iPhone (it had previously worked). The behaviour I saw was that xcode would say "finished running - Profiling [app name]" before the instruments window was even shown (the choose instrument window).
I worked around this by going to product->scheme->edit scheme, select profile [app name] and select an instrument (i.e. Allocations) under the instrument drop down (instead of "ask on launch").
Once I did this, selecting Product->profile worked for me and the instruments was running.
I wanted the zombie instrument which strangely isn't in the xcode dropdown, I was able to use this by simply using file->new in instruments (while the allocations instrument was still connected and running) and I could then choose the zombies instrument and the record button wasn't greyed out!
All of this was with iOS 7.0.3 and xcode 5.0.1.
I hope this helps at least one other person to stop ripping their hair out, but knowing xcode I somehow doubt it!
Upvotes: 3
Reputation: 508
Note that if you have multiple targets, it is very likely that you need indeed to tell Xcode which one you want to profile. Use the edit targets scheme above
Upvotes: 0
Reputation: 2744
I had the same issue! I could only use Instruments on my iPhone but not on iPad or iPad2! Whenever I started instruments with Xcode 4 it would just beep and the record button would be disabled..
I solved this issue by in XCode going to >Targets>Edit Scheme>Profile "yourAppName" and changing the Build Configuration from Release to Debug. Then try to profile again Product>Profile
If you get the beep again.. You will see that it says "CHOOSE TARGET" next to the record button open the drop down >Choose Target> "yourAppName" then hit record.
This solved it for me and was finally able to run instruments again!
I know this post is old but i hope it helps someone.
Upvotes: 17
Reputation: 3376
I had the same problem after reinstalling Snow Leopard last week. I moved my /Developer folder to /Developer_old and re-ran the Xcode installer pkg, and now have Instruments back.
HTH
Upvotes: 1