In Salesforce, a debug log records database operations, system processes, and errors that occur when executing a transaction or while running unit tests. The system generates a debug log for a user every time that user executes a transaction that is included in the filter criteria. You can monitor and retain debug logs for the users specified below.
Each debug log must be 20 MB or smaller. If it exceeds this amount, you won’t see everything you needed. Additionally, each org can retain up to 1,000 MB of debug logs. The oldest logs are overwritten.
To generate Debug Logs in Salesforce, go to Setup –> Monitor –> Logs –> Debug Logs.