Rename debug_print to debug_repr and make it return a string