Using the Developer Console for real-time debugging

The System Log (now the Developer Console) is a valueable tool for any administrator or developer. It can be used to watch requests come into in real-time. The Developer Console also allows you to execute anonymous Apex code in real-time. This page will show you where to find the Developer Console and guide you through how to use it.

Before we begin, make sure you are logged into either in a Developer account or as a System Administrator.


To launch the Developer Console follow these instructions:

Step 1- After logging into, click on the Developer Console under your name. See below:

 Click on the image to view full size

After clicking on the Developer Console link, the Developer Console will open in a new window. If you've got two monitors, drag the Developer Console window over to one and have open in the other. I do this because I like to see them both at the same time. With the Developer Console up, any request that comes into will show up in your Developer Console window in real-time. You can see in the screenshot below that a single request has come in:



Click on the image to view full size 



Step 2 - View the details of requests as they show up in the Developer Console window. You can view the details of a given request by clicking on the row of the request you would like to view. When you click on the row, all the details that has captured will show up in the box below. In the screenshot below, you can see that a given request has been clicked on (highlighted in grey) and all its details are shown:

Click on the image to view full size


Step 3 - You can use the Developer Console to execute Apex code on the fly. This is considered "anonymous" execution. In the screenshot below, we've inserted a single statement into the code window.

System.debug('Hello World!') 


Click on the image to view full size


 When we click the "Execute" button in the Developer Console (shown above) we can see that it executes the line of code we've entered and displays the log results in the box below.

For detailed information on the Developer Console, they have got a fantastic help document here.