4

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!

Fish OnTray
  • 199
  • 4
  • 15
  • Try running instruments with the `-v` verbose logging. It might give you more information – stackErr Oct 26 '12 at 21:55
  • Also, try removing the automation results directory you are specifying or specify a blank one. Sometimes an incomplete result is written there and it hoses instruments. – Jonathan Penn Nov 05 '12 at 19:49

1 Answers1

3

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

Fish OnTray
  • 199
  • 4
  • 15