How to debug templates? Are there any good practices? Or only by trial and error and endless restarts?