
- To view the debug logs, from the setup option in Salesforce, enter ‘Debug Logs’ in the ‘Quick Find box’, then select ‘Debug Logs’.
- Once you select the Debug Logs, click the ‘View’ button to examine the log.
- Click ‘Download’ to download the logs as an XML file.
Table of Contents
How to use debug logs in Salesforce to troubleshoot?
- Processes created in the Process Builder appear as flows and workflow rules in debug logs. …
- Record change processes appear as flows of type Workflow. …
- Immediate actions that are executed in a block are strung together in the flow. …
- Scheduled actions are executed after a FLOW_WAIT element. …
How to enable debug logs?
Log on to the computer as a member of the local administrators group. Launch Event Viewer. Select ViewShow Analytic and Debug Logs. Navigate to Event Viewer (Local)Applications and Service LogsMicrosoftUser Experience VirtualizationApp Agent. Right-click on Debug under App Agent and select Enable Log.
What are debug logs and how do I use them?
- Each debug log must be 20 MB or smaller. …
- System debug logs are retained for 24 hours. …
- If you generate more than 1,000 MB of debug logs in a 15-minute window, your trace flags are disabled. …
- When your org accumulates more than 1,000 MB of debug logs, we prevent users in the org from adding or editing trace flags. …
How do I collect debug logs?
To collect debug logs
- Right-click on “Debug” node and select “Save all events as”.
- Choose a location and a file name and Save.
- Choose “Display information for these languages” and select “English (United States)”.
- Click “Ok”.

How do I read a debug log?
You can read a debug log by identifying what each column represents.Timestamp—The time when the event occurred. … Event—The event that triggered the debug log entry. … Details—Details about the line of code and the method name where the code was executed.
What is debug logs in Salesforce?
A debug log can record database operations, system processes, and errors that occur when executing a transaction or running unit tests. Debug logs can contain information about: Database changes. HTTP callouts.
How do I view Apex logs?
View a debug log by passing its ID to the force:apex:log:get command….Generate and View Apex Debug LogsLog in to the org.For Replay Debugger, run SFDX: Turn on Apex Debug Log for Replay Debugger.Create a launch configuration file for Replay Debugger or Interactive Debugger.
How do I download a debug log in Salesforce?
To view the debug logs, from the setup option in Salesforce, enter ‘Debug Logs’ in the ‘Quick Find box’, then select ‘Debug Logs’. Once you select the Debug Logs, click the ‘View’ button to examine the log. Click ‘Download’ to download the logs as an XML file.
How do I open the debug log in developer console?
Use the Logs tab in the Developer Console to open debug logs.
How do I debug in Salesforce?
Use checkpoints, logs, and the View State tab to help debug the code you’ve written.Set Checkpoints in Apex Code. Use Developer Console checkpoints to debug your Apex classes and triggers. … Overlaying Apex Code and SOQL Statements. … Checkpoint Inspector. … Log Inspector. … Use Custom Perspectives in the Log Inspector. … Debug Logs.
What is debug mode in Salesforce?
Debug mode adds some colour changing counters to the top right corner of the screen and removes minification of Salesforce and custom component code.
How do I debug a test class in Salesforce?
Go to Setup>Developer>Apex Test Execution>Select Tests> pick the testing class you want to see the debug logs from can click run.
How long are debug logs retained?
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.
What is a debug log?
A debug log can record database operations, system processes, and errors that occur when executing a transaction or running unit tests. Debug logs can contain information about: Database changes. HTTP callouts. Apex errors.
What is debug filtering?
Debug log filtering provides a mechanism for fine-tuning the log verbosity at the trigger and class level. This is especially helpful when debugging Apex logic. For example, to evaluate the output of a complex process, you can raise the log verbosity for a given class while turning off logging for other classes or triggers within a single request.
What is a log line?
Log lines are included inside units of code and indicate which code or rules are being executed. Log lines can also be messages written to the debug log. For example: Log lines are made up of a set of fields, delimited by a pipe ( | ).
Does Class3 override Class1?
To this end, the debug log levels of Class1 are raised to the finest granularity. Class3 doesn’t override these log levels, and therefore inherits the granular log filters of Class1. However, UtilityClass has already been tested and is known to work properly, so it has its log filters turned off.
Does debug log include time based workflows?
The debug log does not include information from actions triggered by time-based workflows. You can retain and manage debug logs for specific users, including yourself, and for classes and triggers. Setting class and trigger trace flags doesn’t cause logs to be generated or saved.
Debug Logs in Salesforce
Debug logs in Salesforce are the best source of information to uncover what is actually taking place on the platform. These are the best option to track back events that might have happened in the Org. Specifically, if we are doing root cause analysis for a particular problem, we can trace out the root cause from the debug logs.
Use cases of debug logs
Debug logs can be used by the developers for tracing any errors that might have occurred on the application. For example, the application is not stable or it is impacting the performance of the other components, or it might stop responding after a certain user input because exceptions are not defined.
Limitations of the Debug Log
Debug logs are undoubtedly helpful for monitoring the platform, but it has certain limitations as well.
Setting Up the debug logging
Debug logging can be activated for Apex classes & triggers and normal users. For this, trace flags need to be configured along with the debug levels, in the Developer Console. Each trace flag will contain the following:
Debug Log Details
Analyzing the debug log is an art, and might need prior experience as a developer or administrator. However, if you are aware of the components of the debug logs, at least you will be aware, where to look for what. The components of the debug log are mentioned below:
