Recently code containing a debugging override was release to production. The code was clearly marked
// TODO - Remove before releasing to production
You could use the following plugin to detect TODO and/or FIXME (or any other comment text you define) and mark the build as unstable or failed if any are found: Task Scanner Plugin
However this analysis would be performed after the code is pulled down so it would depend on how your move-to-production process is set up. This plugin would allow you to mark the build job as failed (once you add it as a post-build step) and you could then cancel any downstream jobs if TODO was detected. If your move-to-production job is downstream from this build job, this would solve your problem.