Added back option to enable debug mode that was lost in conversion to new TEA build system