added generate_debug to public