Suyati Technologies
  • Platforms
    • CRM
      • Salesforce
      • Dynamics
    • CMS
      • Sitecore
      • Drupal
      • Episerver
      • Sitefinity
    • Ecom
      • Magento
      • Sitecore commerce
    • RPA
      • UiPath
    • Analytics
    • Martech
  • Services
    • CX Consulting
    • DSaaS
    • Product Engineering
  • Fluid Solutions
    • Buyer Rhythms Engine
    • Lead Prioritization
    • Customer LifeTime Value
    • Chatbot
    • Account Based Marketing
    • Online Proctoring Solution
  • Intel
    • Blog
    • eBooks
    • Webinars
    • Case Studies
  • About Us
    • Management Team
    • Advisory Board
    • Our Story
    • Testimonials
  • Careers
Suyati Technologies
  • Platforms
    • CRM
      • Salesforce
      • Dynamics
    • CMS
      • Sitecore
      • Drupal
      • Episerver
      • Sitefinity
    • Ecom
      • Magento
      • Sitecore commerce
    • RPA
      • UiPath
    • Analytics
    • Martech
  • Services
    • CX Consulting
    • DSaaS
    • Product Engineering
  • Fluid Solutions
    • Buyer Rhythms Engine
    • Lead Prioritization
    • Customer LifeTime Value
    • Chatbot
    • Account Based Marketing
    • Online Proctoring Solution
  • Intel
    • Blog
    • eBooks
    • Webinars
    • Case Studies
  • About Us
    • Management Team
    • Advisory Board
    • Our Story
    • Testimonials
  • Careers
Suyati Technologies > Blog > Force.com Developer Console

Force.com Developer Console

by Abhishek Subramanian March 21, 2013
by Abhishek Subramanian March 21, 2013 0 comment

Developer Console started off as a basic Log Viewer in Salesforce for executing apex code anonymously.
Over a couple of releases, Developer Console (known earlier as “System Log”) has become much interactive in a way where the users can look at logs on depths of a line of code like for example, how are the performance metrics at this point of execution and how is the execution cycle performing from timing perspective. Developer Console also brings the ability to edit the code and not just about viewing it. With the Spring ’13 release of Salesforce, Developer Console has also got the ability to perform compilation checks as you write code and as well as with visual force markup completion capabilities.
Let’s checkout various features in Developer Console
Developer Console
The textbox at the top is used for creating and editing apex code. On clicking on the textbox, a bigger code box appears on the screen as shown below.
code box
You can execute the whole code by clicking on “Execute” button or executed any selected piece of code by using the “Execute Highlighted” button.
Developer Console comes up with the concept of Workspaces. Workspaces let us do different types of application debugging or operations in virtually different consoles. You can create/open/delete workspaces in Developer Console. By default, one workspace is always available named “Default”. You can change the name of the workspaces as necessary.
Workspace
Developer Console workspace
The console tabs currently available on Developer Console are
a)      Logs
b)      Heap Dumps
c)       Repository
d)      Tests
e)      Query Editor

LOGS TAB

The log summary of the code that you run on the apex code editor is shown under the Logs tab. The log summary includes information about the user who has run the code, application information, the kind of operation, time of execution, status of the execution, log read or not and the size of the log data.
LOGS TAB

HEAP DUMPS TAB

Heap Dumps tab mainly are concerned with simulated breakpoints. Breakpoints can be set in apex code using the code editor that opens up when we open class/trigger/page in Repository tab. These breakpoints show up in the Heap Dumps and make it easy for the developer to look the concerned point of concern.
As you can see in the Heap Dump Locations, the entry shown there is same as the point where we have set breakpoint in the apex controller code.
HEAP DUMPS TAB

REPOSITORY TAB

Repository tab is mainly used for understanding the related entities of any concerned apex code. In an organization, there could be thousands of apex classes through which the control navigates. Repository tab becomes handy in this situation where we can look and get to a particular related entity from a top level entity like a visualforce page.
For example, a visualforce page could be hooked up to a visualforce controller and that controller could be talking to around 5 or 6 apex classes. Now, how do we get to understand this relationship and get to a particular apex class in this relationship?
The screenshot shown below depicts a way to get to the related controller class where we have selected Pages as the Entity Type. Immediately, the Entities tab shows all the visualforce pages available in the organization. When we select a particular visualforce page, the related entities tab gets populated with classes hooked up with that visualforce page.
REPOSITORY TAB

TESTS TAB

The Tests tab again becomes a handy tool for developers to be at one place and do testing of every available test class and understand the response of the system to the tests. We start a new test by clicking the “New Run” button. This opens up a window for us to choose the available test classes to be selected for this run.
TESTS TAB
The selected test class appears on the Test Run grid as shown below. The statistics of the test class run is also shown in summarized format in this grid. The cross or tick on the status column in the grid gives a quick snapshot of what happened with that test.
Test Run grid
When analyzing the failed tests, we can open up the failed point of execution from the Test Run grid and the test statistics in depth would be shown on a grid below. The failed point can be seen in this grid and the reason for failure is also highlighted. A great point of interest is regarding the code coverage aspects. As we all know, Salesforce has governor limits in place to help the multi-tenant Force.com platform in stable state. We can check the code coverage and perform fine tuning in apex code to increase the code coverage. Code coverage from test run perspective and code coverage from each apex class point of view is shown in the Tests tab.
TESTS TAB

QUERY EDITOR TAB

Query Editor is fantastic tool integrated into Developer Console. We can run any SOQL and SOSL queries in the query editor and see the results immediately. We can refine the queries using Query Editor. The interesting thing about Query Editor is that the results grid also can be used to insert, update and even delete records from objects that you have queried for. This can be done using the action point buttons highlighted in the screenshot shown below. You can also interact with the detail page and edit page view of the selected records using the Record Level Interactivity Button.
QUERY EDITOR TAB
Coming back to the Log Tab, we have other section like Stack Tree, Execution Log, Source, Variables and Execution Overview.
LOG TAB COMPONENTS
STACK TREE GRID
Stack Tree is concerned with two factors in log analysis.
a)      Execution
b)      Performance
The Execution Tree shows the key points of platform interactions like DB call or DEBUG points involved in our code logic. The duration and heap size used for the execution is mentioned alongside the execution points.
The Performance Tree shows the duration/duration percentage involved in the execution points mentioned in execution tree. It also shows the Heap size used and the Heap percentage on those execution points as well.
stack tree
EXECUTION LOG GRID
Execution log shows the raw log of the execution point as selected in the Execution Tree. By default, the execution log of the root execution node (which means full log) is shown in this grid. We can use the Filter textbox to filter logs based on a specific keyword.
EXECUTION LOG GRID
SOURCE AND VARIABLE GRID
The Source grid shows the source code that is active at the selected execution point.
The Variable grid shows the variables that are assigned at the selected execution point.
The screenshot shown below shows that during the Heap Allocate point of execution assigns 4 bytes in the heap memory and the code responsible for this heap assignment is the SOQL query and the result of the query is assigned to an Account variable.
SOURCE AND VARIABLE GRID

EXECUTION OVERVIEW AREA

Execution Overview Area is responsible for showing an overall metrics of how many methods, queries, callouts, etc. ran, how much among the governor limits were used & performance graphs for everything that happened during the execution of an apex code.
EXECUTION OVERVIEW AREA
This area has 3 tabs
a)      Executed Units
b)      Limits
c)       Timeline
Executed Units Tab
It shows the individual units of runs that composed the whole apex code run. In our example, we had a SOQL query and a debug method call and commands initiating from the Developer Console to execute the code and finally browser taking control of execution in Salesforce organization.
That is why, we see a Query type execution unit, Method type execution unit and another two method calls in this tab. Some more information regarding individual execution units like Total time of run, Average time of run, minimum and maximum time of run, heap sizes allocated for each execution units and record counts associated with execution units are summarized in this tab.
Limits Tab
I have heard many people getting it hard to remember and find out the limits for a particular type of execution. Limits Tab solves this issue of running around. It shows points of execution that are related to hitting governor limits and show how much of those limits were used and how much limits are un-used from platform recommendations.
Limits Tab
Timeline Tab
This is the performance indicators tab of Developer Console. This tab shows the types of execution units and the time which they took to complete among the complete request-response cycle.
Performance is affected in Salesforce application particularly in association with following components.

  1. Apex Code
  2. Workflows
  3. DB Calls
  4. Validation Rules
  5. Callouts
  6. Visualforce rendering
  7. System wise delays

Timeline Tab
In our example, we had a SOQL query which counts as an execution unit under the DB Calls and a debug statement that is counted as an apex code execution unit. As you can see, Apex code statement utilized 1.26 milliseconds and composed 19.39% of the execution timespan & SOQL statement utilized 5.24 milliseconds and composed 80.44% of the execution timespan. As all these things run on cloud infrastructure, there was also a system delay of 0.01 milliseconds.
From this analysis, we understand that DB calls take most of the execution timespan and thus we have to refine or optimize those areas so that performance always stays on top.
I hope this blog gave a basic idea of various features available on the Developer Console in Salesforce. Let us know your thoughts!! We would be happy to hear from you 🙂 .

Salesforce
0 comment
0
FacebookTwitterLinkedinTumblr
previous post
Why Suyati's 4th Anniversary rocks
next post
How good is HTML5 for SEO

You may also like

Leverage AI to Take your Business to the...

May 17, 2022

Global Capability Centers enable accelerated adoption of technology

May 9, 2022

Best Practices to Get Salesforce Implementation Right the...

April 21, 2022

How to manage legacy systems (Upgrade, Replace, Rebuild)?

April 20, 2022

Tackle Duplication Challenges in Salesforce Effectively

March 24, 2022

What are the Key Takeaways of Salesforce DevOps...

March 22, 2022

Derive Greater Value through Better Hybrid Cloud Management

March 15, 2022

How DevOps can Help Salesforce Develop and Deploy...

March 7, 2022

Six trends that Salesforce has for your enterprise...

February 22, 2022

Harnessing the Power of Cloud Continuum for Your...

February 22, 2022

Leave a Comment Cancel Reply

Save my name, email, and website in this browser for the next time I comment.

Keep in touch

Twitter Linkedin Facebook Pinterest

Recent Posts

  • Leverage AI to Take your Business to the Next Level

    May 17, 2022
  • Global Capability Centers enable accelerated adoption of technology

    May 9, 2022
  • Best Practices to Get Salesforce Implementation Right the Very First Time

    April 21, 2022

Categories

  • Twitter
  • Linkedin
  • Facebook
  • Instagram
  • Platforms
    • CRM
      • Salesforce
      • Dynamics
    • CMS
      • Sitecore
      • Drupal
      • Episerver
      • Sitefinity
    • Ecom
      • Magento
      • Sitecore commerce
    • RPA
      • UiPath
    • Analytics
    • Martech
  • Services
    • CX Consulting
    • DSaaS
    • Product Engineering
  • Fluid Solutions
    • Buyer Rhythms Engine
    • Lead Prioritization
    • Customer LifeTime Value
    • Chatbot
    • Account Based Marketing
    • Online Proctoring Solution
  • Intel
    • Blog
    • eBooks
    • Webinars
    • Case Studies
  • About Us
    • Management Team
    • Advisory Board
    • Our Story
    • Testimonials
  • Careers

© 2022 Suyati Technologies


Back To Top
Suyati Technologies

Popular Posts

  • MongoDB vs. Couchbase

    May 26, 2013
  • 2

    What is Salesforce CRM and What Does it Do?

    February 19, 2014
  • 3

    A step-by-step guide to configuring emails in MS Dynamics CRM

    April 27, 2017
  • 4

    Top 10 ETL Tools for Salesforce Data Migration 2021

    January 4, 2021
  • 5

    What are the Top 3 risks for implementing a CX Program?

    August 30, 2019
© 2022 Suyati Technologies

Read alsox

A look at Hypothetical Indexes in SQL Server

March 6, 2013

How can Big Data transform your HR Department?

July 17, 2017

Why Choose Kentico CMS over its Open-Source kin

December 7, 2015
Suyati Logo

Leaving So Soon?

Know more about business technology platforms for your enterprise.

Thank you!

We're glad to have you as part of our community. You'll start receiving updates shortly. Please feel free to contact us anytime with feedback or suggestions.

By continuing to use this website you agree with our use of cookies. Read More Agree