Try adding set -x to ps/commands