Initial implementation with debug mechanism