【问题标题】:Instruments failing to launch from command line仪器无法从命令行启动
【发布时间】:2012-02-08 22:07:05
【问题描述】:

我一直在尝试从命令行运行 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

有人能告诉我我缺少什么吗?

【问题讨论】:

    标签: command-line launch xcode-instruments


    【解决方案1】:

    我相信错误Invalid connection 和以下Set a breakpoint... 是 Instruments 在遇到任何问题时会做出的响应。

    真正重要的是最后一行: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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-10
      • 2017-09-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多