Move debug_ISR into ISR