我一直在尝试从命令行运行Instruments。 但它失败并出现以下错误:
2012-02-08 14:48:16.104 instruments[94502:60f] -[NSAlert alertWithError:] called
with nil NSError. A generic error message will be displayed,
but the user deserves better.
Wed Feb 8 14:48:16 c1dev-dm23409.overstock.com instruments[94502]
<Error>: kCGErrorInvalidConnection: CGSGetCurrentCursorLocation: Invalid connection
Wed Feb 8 14:48:16 c1dev-dm23409.overstock.com instruments[94502]
<Error>: kCGErrorFailure: Set a breakpoint @CGErrorBreakpoint() to catch errors as
they are logged.
2012-02-08 14:48:16.137 instruments[94502:60f] Recording cancelled : At least
one target failed to launch; aborting run
有人可以告诉我我错过了什么吗?
答案 0 :(得分:1)
我认为错误Invalid connection
和以下Set a breakpoint...
是仪器在遇到任何问题时会做出响应的。
最后一行真正重要的是:Recording cancelled : At least one target failed to launch
。
根据我的经验,这或者意味着您的程序无法加载(配置配置文件,不存在的构建等),或者您没有在命令行上正确指定它。以下是我指定instruments
:
$ instruments -t /Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate
/path/to/my/AppName.app -e UIARESULTSPATH . -e UIASCRIPT testscript.js