Xcode 4: custom behavior does not execute my sh script?

后端 未结 1 1733
难免孤独
难免孤独 2021-01-23 05:06

I created a custom behavior in Xcode 4 (Xcode > behaviors > edit behaviors > +) in order to launch a shell script (which is configured to be executable). I can invoke the behavi

相关标签:
1条回答
  • 2021-01-23 05:38

    Your script probably is running, but the output of such scripts is not piped to the debugger console. The output should be visible in the Console application (/Applications/Utilities/Console) as in the following example:

    Screenshot of the Console Application
    As for debugging this kind of thing, you can add the following line at the top of your script to send all output to a log file:

    exec &>/path/to/logfile
    

    You could then add something like this at the end of your script to allow you to peruse the log:

    open -a TextEdit /path/to/logfile
    
    0 讨论(0)
提交回复
热议问题