Debug replace routine.