Perform this loop only when the -debug flag is specified.