introduce a print_debug convenience function