I have a very highly instrumented zsh and am experiencing a particular heisenbug. The zsh process just exits for no apparent reason. I have set the OS to produce coredumps and this did not generate any when the issue was reproduced. I think that a reasonable approach to debugging that is very likely to produce useful results is to use the set -x option to show each command that ran. then at least I can see what area of plugins might be implicated. The problem is that this is a heisenbug and it comes and goes, the shell will be simply unusable when the xtrace output is there, and I can't really use the shell effectively if I redirect stderr to a file. So I am hoping there is a way to get the xtrace output and ONLY the xtrace output into a separate file. If there is no feature in place I still expect that there should be an easy way to patch zsh to allow me this. Thanks.