check arguments to debug() and fix resulting warnings.