grep -r . "some random debug message"
(searches for the passage recursively in all files from the directory it was executed, the main reason I like developing in linux more than windows)
If you are searching inside code specifically, you may like 'ack'. It does the same thing grep does, except it has preset 'excludes', is recursive by default, and the output is a bit prettier.