Given a shell script (bash in this example), one can use the
set -x or
-x passed to bash or other supporting shells to generate debug output.
I know how to redirect said output to a file
./script.sh 2> out.log or
bash -x script.sh 2> out.log.
But how to send stderr to a terminal multiplexer, like
Mainly useful when script change the way the terminal is displayed(TUI), so sending stderr enable more comfortable debugging in another window/terminal.