What is Salesforce Developer Console?

Salesforce Developer Console is a browser based developing environment which is used to Create, test and debug application in salesforce organization. Using salesforce developer console we can and edit execute SOQL and SOSL queries.

What are the tools and features in Salesforce Developer Console?

Salesforce developer console has a menu bar, Workspace and Logs tab which contains several items like logs, Tests, Checkpoints, Query editor, Progress and problem. In Menu bar we File, Edit, Debug, Workspace and Help. 

  • File menu :- We can create new apex class, Apex trigger, Visualforce page, Visualforce components, Static resource and many more.
  • Edit menu : Using edit menu we find text in the current view, Find / Replace. Find / Replace All / Search in files and fix indentation.
  • Debug Tab : We can open new window to enter apex code for testing using execute anonymous windows and can execute last Apex code.
  • Workspace : Workspace in developer console is a collection of resources represented by tabs in the main panel. Here we can create new workspace, can switch workspace, can rename current workspace and can delete workspaces.
  • Help : Here help documents, shortcut keys and preferences settings will be available.
ADVERTISEMENT

How to use Salesforce Developer Console?

To open Salesforce Developer Console, navigate to Name | Developer console.

Salesforce Developer Console

Now developer Console will be opened with menu bar, Workspace and log menu. Using developer console in Salesforce we can create Apex Class, Apex Trigger, Visualforce page, Visualforce Component, Static resources, Lightning application and many more as show below.

Salesforce Developer Console

To create new Visualforce page in Salesforce developer console navigate to File | New | Visualforce page.

Now in Workspace enter Apex code and Save the Code.

Salesforce Developer Console

To execute apex code click on Preview button and a new window with visualforce page result will be opened in new window.

How to execute SOQL Query in Salesforce Developer Console?

To execute SOQL and SOSL queries in Salesforce developer console click on Query Editor tab.

SOQL query in Salesforce Developer console

A new workspace will be displayed to enter SOQL query as shown above.

Enter SOQL query.

Click on execute button.

Run the following SOQL Query.

SELECT Name FROM USER

As shown above SOQL query, All User name in the organization will be extracted and displayed in the SOQL query result. For every function in Developer console, a new tab will be opened below the menu bar.

Conclusion

In this Salesforce Developer Tutorial, we learned how to use Salesforce Developer Console.