refactor body.debug.tpl