Implemented patch debug