template debugging