You are using an older browser that might negatively affect how this site is displayed. Please update to a modern browser to have a better experience. Sorry for the inconvenience!

Salesforce Developer Console


Salesforce Developer console is an integrated development environment with a set of useful tools for coding, debugging and testing applications. It also has the ability to perform compilation checks and Visualforce markup completion capabilities.

To open the Developer Console.

Login to your Salesforce instance then click on Your name | Developer Console

dc1909-1.png

The Developer Console is organized into the following sections:

1. Menu bar

2. Workspace

3. Logs, Test, Problems, and other panels

Developer Console comes up with the concepts of Workspaces. Workspaces allow with difference types of applications for debugging operation in virtually difference consoles. You can create, open, delete and switch workspaces in the Developer Console.

dc2209-2.png

Menu bar

  1. The File menu allows to create, open and delete resource.
  2. The Edit menu allows to edit the code and search operation.
  3. The Debug menu shows the range of execution and change in log level.
  4. The Test menu provides the various level of testing options.
  5. The Workspace menu includes the manipulation in operation.
  6. The Help menu represents the group of shortcut keys for reference pages, Console preferences page, Online help and with a Collection of guided tours.

Workspace
A Workspace is a set of resources represented by tabs such as Source Code Editor and Log Inspector.

Log, Test, Progress, and other panels.

  1. Logs
  2. Tests
  3. Checkpoints
  4. Query Editor
  5. View State
  6. Progress
  7. Problems

Log displays debug log information.

dc2209-3.png

Logs & Logs Inspector

  1. Logs tab captures and lists the current user’s database events, Apex processing, workflow, callouts, and validation logic.
  2. To open the selected log in the Log Inspector, click File | Open Log or double-click the log on the Logs tab.

dc2209-4.png

3. To open the selected log in a text editor, click File | Open Raw Log.

4. To remove all logs from the list, click Debug | Clear | Log Panel.

5. To see all debug logs saved for your organization, click Debug and deselect Show My Current Logs Only.

6. To download a copy of the selected log as a text file, click File | Download Log. The default name for the file is apex.log. The default name for the file is apex.log.

Test displays the status of test class.dc2209-5.png

Checkpoints displays a snapshot of the state of objects in memory at the time of reaching the checkpoints. It displays the checkpoints currently available for review.

dc2209-6.png

Query Editor executes SOQL Query and SOSL Query.

dc2209-7.png

View State allows you to examine the view state of a Visualforce page.

dc2209-8.png

Progress displays all asynchronous requests.

dc2209-9.png

Problems displays the compilation errors.

dc2209-10.png

Log Panels
The Log Inspector can contain any of the following panels:

  1. Stack Tree
  2. Execution Stack
  3. Execution Log
  4. Source
  5. Variables
  6. Execution Overview

dc2209-11.png

Stack Tree
The Stack Tree panel displays two tree views that display the data in a top down manner and allows us to view the data for entire call hierarchy. For example, If a class calls an inner class, the inner class displays as a child node of the outer class.

  1. Execution Tree
  2. Performance Tree

The Execution Tree displays each operation. For example, if a “for” loop executes 4 times, the execution tree shows the duration of all 4 iterations.

dc2209-12.png

The Performance Tree aggregates the count of calls. Using the same example above, the performance tree displays the total duration of every call to debug.

dc2209-13.png

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.dc2209-14.png

Execution Log
The Execution Log panel displays 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.dc2209-15.png

This Frame: Displays only this region of the process, or only the items that are associated with the level Executable: Displays only the executable items in the debug log. Debug Only: Displays only the debug statements you have added to the code. Filter: Displays items that match what you enter in the associated field.

Source
Source Panel displays the executed source code. 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.

dc2209-16.png

Execution Overview
It has four tabs. They are Save Order, Limits, Timeline and Executed Units.

Save Order
The Save Order tab displays a color-coded timeline of DML actions. For each DML action taken, save order elements are shown as boxes in different colors for the entire duration of the calls.
The following colors are used to differentiate the elements:

  1. Red – Before Trigger
  2. Orange – After Trigger
  3. Green – Validation Rule
  4. Blue – Assignment rule
  5. Purple – Workflow Rule

dc2209-17.png

Limits
It displays the overall system limits by name and amount used for the requested process.

Timeline
The Timeline tab provides a visual representation of the time taken by each process.

dc2209-18.png

The Executed Units
It displays the system resources used by each item in the requested process.

dc2209-19.png

Summary
Salesforce Development Console is an effective tool to develop Apex classes, Visualforce pages, Apex triggers, and other Salesforce components. The Console also has many productive features to debug, monitor, and test the performance of the code executed.