bash debugging hell [solved!]

Debugging a bash script that runs a bunch of stuff in subshells (with recursive sprinkles on top!) and pulling my hair out trying to get it to run with -vx and redirect to a file. Tried various combinations of XTRACEFD & normal redirects with no luck. But there's always more than one way to skin a cat, right?

  • screen -L
  • bash -vx
  • exit && $EDITOR screenlog.0