Debug function.