Good comment from an interestingly named user on an r/bash thread.
Great points. I never add set -x to my scripts, or the interactive shell I’m in.
Instead, I use bash -x $script.sh. don’t have to remember to set +x or
remove a line from the script.— u/CaptainDickbag