debug function call