Test debug function