Simplify a debug code function.