How can I debug a Launchd script that doesn’t run on startup?

Best way I found to debug, in your plist:

<key>StandardErrorPath</key>
<string>/tmp/mycommand.err</string>
<key>StandardOutPath</key>
<string>/tmp/mycommand.out</string>

Open Console app, in “All Messages” you should see entries when your app fails or succeeds. Like this:

4/28/15 10:43:19.938 AM com.apple.xpc.launchd[1]: (mycommand[18704]) Service exited with abnormal code: 1

The issue I had was with ProgramArguments takes each item of command as <string> item in the array.

EDIT:
In my case, generating a simple wrapper for shell script worked even better.
This script sets up basic folder structure to make a shell script into an OS X “app” – https://gist.github.com/mathiasbynens/674099. This might work better for your mysql -u arg1 command.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)