What file generated output
If you are running on Gnu/Linux or Unix, you should be able to position yourself above the directory holding your code and use the following shell command:

grep -r print_r .


This will recursively search through the current directory and all the directories below it for the string "print_r" and print out all lines containing that string, prefixed with its file name.

For future debugging, I suggest you install the Devel module for debugging.  At least one of its debug printout functions (dpm()) will print where the debug statement is placed by name of file and line number if the object is complex enough to produce a Krumo accordion display of the object/array.

For simpler objects, use the second argument to dpm() to remind yourself where you placed it. E.g.:

dpm($uid, 'mymodule, line 42, $uid');