generate_debug added