Where is debug.log file in Bitcoin source code?
On Unix systems the debug.log file, as well as all other files created by the client (blockchain data, databases, etc) are placed by default in ~/.bitcoin; that is, a subdirectory of your home directory named .bitcoin.  If you have used -datadir to set a different data directory, debug.log will be placed there instead.

Note that the ls command normally will not show files or directories that start with ., so you won't see this if you just ls your home directory.  But you can still cd there, or use ls -a to see it.