Skip to content

Instantly share code, notes, and snippets.

@habovh habovh/crashdialog
Last active Jul 18, 2018

Embed
What would you like to do?
Simple bash script to quickly enable/disable macOS crash reporting dialogs. Tested on macOS Sierra.
#!/bin/bash
# Author: Jordan Becker (https://becker.io/)
if [ $# -lt 1 ]; then
echo "Usage: $0 (on|off|read)"
echo "Lets you quickly enable or disable macOS crash reporting dialogs. Useful for betas ;)"
exit 1
fi
case "$1" in
"on")
defaults write com.apple.CrashReporter DialogType crashreport
echo "Successfully enabled macOS crash reporting dialogs."
exit 0
;;
"off")
defaults write com.apple.CrashReporter DialogType none
echo "Successfully disabled macOS crash reporting dialogs."
exit 0
;;
"read")
echo "Current dialog type: $(defaults read com.apple.CrashReporter DialogType)"
exit 0
;;
*)
echo "Unrecognized parameter '$1'."
echo "Usage: $0 (on|off|read)"
echo "Current dialog type: $(defaults read com.apple.CrashReporter DialogType)"
exit 0
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.