---
schema_version: "1"
id: 531e457b8d98f95ecc091514f9c53d4ef58dd6061bb865a3d5032b828e1f206d
title: View Debug Logs
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/code_viewing_log_details.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.code_viewing_log_details.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 03eb79c0e9358e0232cd10243abcd99acf4be29b55bd8dedacac93de76669e0b
description: The debug log contains information about each transaction, such as whether it was successful and how long it took. Depending on the filters set by your trace flags, the log can contain varying levels of detail about the transaction.
products:
  - Security
release: "264"
---
# View Debug Logs

The debug log contains information about each transaction, such as whether it was successful and how long it took. Depending on the filters set by your trace flags, the log can contain varying levels of detail about the transaction.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d118006e39">User
              Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d118006e39 ">To view, retain, and delete debug logs:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d118006e39 ">View All Data</td>

          </tr>
        </tbody>
      </table>

1. To view a debug log, from [Setup](https://help.salesforce.com/s/articleView?id=xcloud.basics_nav_setup.htm&type=5&language=en_US), use the Quick Find box to find and select **Debug Logs**.
2. Click **View** next to the debug log that you want to examine.
3. Click **Download** to download the debug log as a log file.

Debug logs have the following limits.

- Each debug log must be 20 MB or smaller. Debug logs that are larger than 20 MB are reduced in size by removing older log lines, such as log lines for earlier `System.debug` statements. The log lines can be removed from any location, not just the start of the debug log.
- System debug logs are retained for 24 hours. Monitoring debug logs are retained for seven days.
- If you generate more than 1,000 MB of debug logs in a 15-minute window, your trace flags are disabled. We send an email to the users who last modified the trace flags, informing them that they can re-enable the trace flag in 15 minutes.
    
    ![Warning](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-security-264-0-0-production-enus/8cecd769-ab2d-4e07-addf-c4f2927925e1/images/icon_warning.png)
    
    Warning If the debug log trace flag is enabled on a frequently accessed Apex class or for a user executing requests often, the request can result in failure, regardless of the time window and the size of the debug logs.
- When your org accumulates more than 1,000 MB of debug logs, we prevent users in the org from adding or editing trace flags. To add or edit trace flags so that you can generate more logs after you reach the limit, delete some debug logs.

#### See Also

- [Monitor Debug Logs](https://help.salesforce.com/s/articleView?id=xcloud.code_monitoring_debug_logs.htm&release=264.0.0&type=5 "Set trace flags to trigger logging for users, Apex classes, and Apex triggers in the Developer Console or in Setup. Monitor the resulting logs to diagnose problems in your org.")
- [Debug Logs](https://help.salesforce.com/s/articleView?id=platform.code_debug_log.htm&type=5&language=en_US)
- [Delete Debug Logs](https://help.salesforce.com/s/articleView?id=platform.code_debug_log_delete.htm&type=5&language=en_US)