The DEBUG variable enables three types of debugging output dependant on the settings of various bits.
bit value purpose 0 1 Display all commands executed 1 2 Display all alias substitutions made 2 4 Display all function calls and return valuesDEBUG 3 will show all command executed and all alias expansions. DEBUG 7 will show EVERYTHING. It is pretty messy so you might want to set HOLD_MODE on when you use this. Keep in mind that flush will flush pending client output as well, in case you get more than you bargained for.