You can also set it for a bunch of lines then deactivate it with `set +x`. It gets rather tedious otherwise...
Re:Bash Debugging
by mellutussa on Saturday March 02, 2024 @09:02AM
(#39572592)
This is a lifesaver. Although I save the -x until I really need to see all the garbage debug output.
I find it’s usually worth the noise to catch weirdness
set -euxo pipefail
at the top of my bash scripts. It makes some conditional testing more difficult but it has paid for itself many times over just because of pipefail