rewrite debug to static