---
schema_version: "1"
id: 3a1b8901c3fe02f837fe1852196af2e02995712e9259176ce4173e7b4738f450
title: Log Inspector
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/code_dev_console_view_system_log.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.code_dev_console_view_system_log.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f54607a68d7ce69ca541118f2ab5d050fa3a53110e9929452b2a998fe8e3d294
description: The Log Inspector is a context-sensitive execution viewer in the Developer Console. It shows the source of an operation, what triggered the operation, and what occurred next. Use this tool to inspect debug logs that include database events, Apex processing, workflow, and validation logic.
products:
  - Salesforce Platform
release: "264"
---
# Log Inspector

The Log Inspector is a context-sensitive execution viewer in the Developer Console. It shows the source of an operation, what triggered the operation, and what occurred next. Use this tool to inspect debug logs that include database events, Apex processing, workflow, and validation logic.

The panels displayed in the Log Inspector depend on the selected perspective. To switch perspectives, select **Debug** | **Switch Perspective**. For details on default and custom perspectives, see [Managing Perspectives in the Log Inspector](https://help.salesforce.com/s/articleView?id=platform.code_dev_console_perspectives_working.htm&release=264.0.0&type=5 "A perspective is a predefined layout of panels in the Log Inspector.").

Some features in the Log Inspector, such as filtering and searching, are available only after a debug log has finished loading and processing. To access a log that is still processing, select **File** | **Open Raw Log**.

## Log Panels

The Log Inspector can contain the following panels:

- [Stack Tree](#code_dev_console_view_system_log__apex_log_stack)
- [Execution Stack](#code_dev_console_view_system_log__execution_stack)
- [Execution Log](#code_dev_console_view_system_log__apex_log_execution)
- [Source](#code_dev_console_view_system_log__apex_log_source)
- [Variables](#code_dev_console_view_system_log__apex_log_variables)
- [Execution Overview](#code_dev_console_view_system_log__apex_log_profiling)

To design a custom perspective from the available panels, select **Debug** | **View Log Panels**, or press Ctrl+P .

![Developer Console Log Inspector Select Panels window](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/extend_code/images/code_dev_console_system_log_perspective_select_panels.png)

If you design a custom perspective you want to use again, select **Debug** | **Save Perspective** and give it a memorable name. After a custom perspective is saved, you can select it any time you use the Log Inspector by selecting **Debug** | **Switch Perspective**.

Most panels refresh automatically when you click an item in a related panel. For example, if you click a folder in the Stack Tree panel, the Execution Stack, Execution Log, and Source panels are updated to display information about the related object. Similarly, if you click a line in the Execution Log, the Stack Tree, Execution Stack, and Source panels are all updated with details on that line. Clicking an item in the Executed Units tab in the Execution Overview updates the Execution Log, Stack Tree, Execution Stack, and Source panels.

## Stack Tree

The Stack Tree panel displays two tree views that show information “top down”—from initiating calls to the next level down—so that you can see the hierarchy of items in a process. For example, if a class calls a second class, the second class displays as a child node of the first class.

The Execution Tree shows each operation. For example, if a `for` loop calls `System.debug()` eight times, the Execution Tree shows the duration of each call.

![Log Inspector Execution Tree shows duration of each debug call](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/extend_code/images/code_dev_console_system_log_execution_tree.png)

The Performance Tree aggregates operations to give you a better look at the performance of an operation as a whole. Using the previous example, the Performance Tree lists the total duration of every call to `debug`.

![Log Inspector Performance Tree shows total duration of all calls to debug](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/extend_code/images/code_dev_console_system_log_performance_tree.png)

This log was generated from the Execute Anonymous window. Calls to `debug` and other methods from other locations in your code are aggregated in the executed unit.

Each section in the Stack Tree panel includes this information:

 
| Column | Description |
| --- | --- |
| Scope | Delimited region within the process, such as workflow, a class, or DML. |
| Unit | Name of the item (region). |
| Duration | Amount of time (in milliseconds) the item took to run. |
| Heap | Amount of heap (in bytes) the item used. |
| Iterations | Number of times the item was called. |

## Execution Stack

The Execution Stack panel displays a “bottom-up” view of the currently selected item in the debug log, starting with the lowest level call, followed by the operation that triggered that call, and so on.

![Log Inspector Execution Stack panel](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/extend_code/images/code_dev_console_system_log_execution_stack.png)

## Execution Log

The Execution Log panel contains the debug log for the current process. The debug log contains every action that occurred in the process, such as method calls, workflow rules, and DML operations. To view long lines that are truncated in the view, hover over the line to display a popup.

![Developer Console, execution log filtering controls](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/extend_code/images/code_dev_console_system_log_execution_log_controls.png)

Use the Execution Log to retrace steps through a process. You can step through lines on your own or filter the log to lines of specific interest:

- **This Frame**—Displays only this region of the process, or only the items that are associated with the level. For example, if you select a trigger that calls a class, only the trigger operations are displayed. If you click `CODE_UNIT_STARTED` and select **This Frame**, only the items in the process that occur between `CODE_UNIT_STARTED` and its associated `CODE_UNIT_ENDED` are displayed.
- **Executable**—Displays only the executable items in the debug log. The cumulative limits information is hidden, such as the number of SOQL queries made and the number of DML rows.
    
    ![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/images/icon_tip.png)
    
    Tip Always keep **Executable** selected. Only deselect it when you are working on optimizing your process and need specific limits information.
- **Debug Only**—Displays only the debug statements that you have added to the code.
- **Filter**—Displays items that match what you enter in the associated field. For example, if you select **Filter** and enter DML, only the lines in the execution log with the string “DML” in either the event or details are displayed. The filter is case-sensitive.

The Execution Log panel contains this information:

 
| Column | Description |
| --- | --- |
| Timestamp | System time when the process began, shown in the local user’s time. The format is: HH:MM:SS:MSS. |
| Event | The [Debug event](https://help.salesforce.com/s/articleView?id=platform.code_setting_debug_log_levels.htm&release=264.0.0&type=5). |
| Details | Details pertaining to the event, such as line number and parameters. |

## Source

The Source panel contains the executed source code or the metadata definitions of entities used during the process, and lists how many times a line of code was executed. The content displayed in the panel depends on what's selected elsewhere in the view.

To go to a specific line of code, enter a line number in the entry box at the bottom of the source panel, and click **Jump**.

Click **Open** to open executed source code in Source Code Editor view.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/images/icon_note.png)

Note If validation rules or workflows are executed during the process, the metadata representation displays in the source panel. You can’t open a metadata representation from the Developer Console. See `[ValidationRule](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_validationformulas.htm)` and `[Workflow](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_workflow.htm)` in the Lightning Platform Metadata API Developers Guide.

## Variables

Use the Variables panel to discover when a variable is assigned a value and what that value is. Click a `Variable` event to populate the section.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/images/icon_note.png)

Note The Apex Code log level must be set to **Finest** for variable assignments to be logged.

Another way to view the contents of variables is to use checkpoints, which give you more details about entities held in memory at a point of execution. For details, see [Set Checkpoints in Apex Code](https://help.salesforce.com/s/articleView?id=platform.code_dev_console_checkpoints_setting.htm&release=264.0.0&type=5 "Use Developer Console checkpoints to debug your Apex classes and triggers. You can’t set checkpoints in Visualforce markup.").

## Execution Overview: Save Order, Limits, Timeline, and Executed Units

The Execution Overview panel at the bottom of the Log Inspector contains four tabs:

- The Save Order tab displays a color-coded timeline of DML actions. For each DML action taken, save order elements are shown as boxcars in the timeline.
    
    ![Log Inspector Save Order tab](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/extend_code/images/code_dev_console_system_log_save_order_tab.png)
    
    The following colors are used to differentiate between elements:
    
     
    | Color | Type |
    | --- | --- |
    | Red | Before trigger |
    | Orange | After trigger |
    | Green | Validation rule |
    | Blue | Assignment rule |
    | Purple | Workflow rule |
    
    For details on a specific element, click the associated boxcar in the timeline. The popup window displays additional information, including a link to navigate directly to the relevant place in the log.
    
    To view the IDs of affected records, click the name of the sObject in the left pane.
- The Limits tab displays overall system limits by name and amount used and contains this information:
    
     
    | Column | Description |
    | --- | --- |
    | Limit | Name of the limit. |
    | Used so far | Amount of the limit used by this process at this point of execution. |
    | Request Total | Amount of this limit used by the request at completion. |
    | Total Available | Total amount for the limit. |
- The Timeline tab provides a visual representation of the time taken by each process. Select the **Scale** option that results in the most useful view.
    
    ![Log Inspector Timeline tab](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/extend_code/images/code_dev_console_system_log_timeline_tab.png)
    
    The Timeline tab contains this information:
    
     
    | Column | Description |
    | --- | --- |
    | Category | Type of process. |
    | Millis | Milliseconds of time taken by the process. |
    | % | Percent the process took of the entire request. |
- The Executed Units tab displays the system resources used by each item in the process.
    
    ![Log Inspector Executed Units tab](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/extend_code/images/code_dev_console_system_log_executed_units_tab.png)
    
    The buttons at the bottom of the tab can be used to filter out information by item type. For example, if you don’t want to view details for methods, click **Methods**. Click the button a second time to clear the filter.
    
    The Executed Units tab contains the following information:
    
    <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col style="width:20%">
              <col style="width:80%">
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d12465e627">Column</th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d12465e629">Description</th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Column" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e627 ">What</td>
                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e629 ">
                  <p>Type of process item. Types include:</p>
                  <ul>
                    <li>Method</li>
                    <li>Queries</li>
                    <li>Workflow</li>
                    <li>Callouts</li>
                    <li>DML</li>
                    <li>Validations</li>
                    <li>Triggers</li>
                    <li>Pages</li>
                  </ul>
                </td>
              </tr>
              <tr class="">
                <td data-label="Column" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e627 ">Name</td>
                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e629 ">Name of the process item.</td>
              </tr>
              <tr class="">
                <td data-label="Column" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e627 ">Sum</td>
                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e629 ">Total duration for the item.</td>
              </tr>
              <tr class="">
                <td data-label="Column" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e627 ">Avg</td>
                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e629 ">Average duration for the item.</td>
              </tr>
              <tr class="">
                <td data-label="Column" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e627 ">Max</td>
                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e629 ">Maximum duration for the item.</td>
              </tr>
              <tr class="">
                <td data-label="Column" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e627 ">Min</td>
                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e629 ">Minimum duration for the item.</td>
              </tr>
              <tr class="">
                <td data-label="Column" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e627 ">Count</td>
                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e629 ">Number of times the item was called during the
                  process.</td>
              </tr>
              <tr class="">
                <td data-label="Column" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e627 ">Heap</td>
                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e629 ">Amount of space the item took on the heap.</td>
              </tr>
              <tr class="">
                <td data-label="Column" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e627 ">Query Type</td>
                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e629 ">
                  <p>Type of query. Possible values are: </p>
                  <ul>
                    <li>SOQL</li>
                    <li>SOSL</li>
                  </ul>
                </td>
              </tr>
              <tr class="">
                <td data-label="Column" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e627 ">Sum rows</td>
                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e629 ">Total number of records changed for the item.</td>
              </tr>
              <tr class="">
                <td data-label="Column" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e627 ">Avg rows</td>
                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e629 ">Average number of records changed for the item.</td>
              </tr>
              <tr class="">
                <td data-label="Column" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e627 ">Max rows</td>
                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e629 ">Maximum number of records changed for the item.</td>
              </tr>
              <tr class="">
                <td data-label="Column" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e627 ">Min row</td>
                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d12465e629 ">Minimum number of records changed for the item.</td>
              </tr>
            </tbody>
          </table>
    
    To sort information by a specific column, click the column header.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/images/icon_important.png)

Important If you are using a Mac and you don’t see scroll bars in the Log Inspector panels, open **System Preferences** | **General** and set Show scroll bars to **Always**

- **[Examples of Using the Log Inspector](https://help.salesforce.com/s/articleView?id=platform.code_dev_console_solving_problems_using_system_log.htm&release=264.0.0&type=5)**  
    Here are some of the ways you can use the Log Inspector to diagnose and solve problems.

#### See Also

- [Developer Console Debug Menu](https://help.salesforce.com/s/articleView?id=platform.code_dev_console_menu_debug.htm&release=264.0.0&type=5 "The Developer Console Debug menu allows you to manage your logs and execute anonymous Apex. It includes these options.")
- [Logs Tab](https://help.salesforce.com/s/articleView?id=platform.code_dev_console_tab_browser_logs.htm&release=264.0.0&type=5 "Use the Logs tab in the Developer Console to access logs that include database events, Apex processing, workflow, callouts, and validation logic.")
- [Managing Perspectives in the Log Inspector](https://help.salesforce.com/s/articleView?id=platform.code_dev_console_perspectives_working.htm&release=264.0.0&type=5 "A perspective is a predefined layout of panels in the Log Inspector.")
- [Creating Custom Perspectives in the Log Inspector](https://help.salesforce.com/s/articleView?id=platform.code_dev_console_perspectives_creating.htm&release=264.0.0&type=5 "Every developer has a different style. You can use one of our out-of-the box perspectives, create a custom perspective, or modify an existing perspective.")