Fish OnTray
Fish OnTray

Reputation: 199

Can't start trace when run instrument 4.5 from the command line on devices

I try to run Instruments 4.5 fromt he command line on devices. I have the following

instruments -w UICD -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate /Users/xxx/Library/Developer/Xcode/DerivedData/xxxxx/Build/Products/Debug-iphoneos/AppName.app -e UIASCRIPT /Users/xxxx/Documents/Automation/test.js  -e UIARESULTSPATH /pathName

I also tried omitting the pathname and .app extension as I'm running on an iPod. And tried both Release-iphoneos and Debug-iphoneos build. But no matter what I do, it always gave me the error:

Instruments Trace Error : Failed to start trace

Can anyone tell me why and how to make this work? Thanks!

Upvotes: 4

Views: 1666

Answers (1)

Fish OnTray
Fish OnTray

Reputation: 199

I actually figure out why this is not working. It's nothing wrong with the command listed above. Running Instruments from command line is not currently working on all the supported iOS devices. Same command works for my new ipad with iOS6 but not my old ipod with ealier iOS. I find out the link below. Hope this helps everyone. Also, in some weird case, the command works only when instruments AND Xcode are not running....

https://discussions.apple.com/thread/4344641?start=0&tstart=0

Upvotes: 3

Related Questions