Ohh ok. Thanks for the clarification!
I doubt my friend is using a debugging script, more likely that this is residual code from a template he was using eons ago.
I'll comment it out and see if he complains, if not; I will purge the code.
If I run into a similar issue in the future, I will at least know how to define a js variable :)