Other views are available to show a sorted list of the methods invoked and the SOQL operations performed. If you click on an item it will take you to the call Hovering over an element provides information on the item.
#APEX LOGS CODE#
The main view provides a flame graph for visualising code execution: You may also find it generally useful for quickly understanding how your code is executing.
![apex logs apex logs](https://www.shedsfirst.co.uk/images/AddLarge/20428.jpg)
![apex logs apex logs](https://i.ytimg.com/vi/jCJ9x5_TaYA/maxresdefault.jpg)
However, if you run it from the same folder as a DX project it will use the currently configured default user/scratch org for that project.Īdding a bit of color to your debug logs! The command works against any org you have connected to the DX CLI, including production and sandbox orgs. Pictures do not really do it justice, so here is a short demo video! sfdx force:apex:log:tail -color | grep USER_DEBUG In the following command line example, I have piped the output to another command ( grep) that filters the output to show only USER_DEBUG log lines. Note that you do not need to have a DX project to use this command.
#APEX LOGS INSTALL#
You can install the Salesforce DX CLI here. This is similar to the experience in Developer Console logs pane, but is effectively opening the logs and dumping them out as they are produced on the server for you automatically. Maybe you are reproducing a bug and are watching for a certain SOQL query or method being executed or we just want filter output in different ways.Ī recent addition to the DX command line from Chris Wall is the ability to effectively stream debug logs from any org connected to DX to the command line console. While the Apex Interactive Debugger provides an interactive experience, sometimes you want to monitor, parse or filter logs.
![apex logs apex logs](https://apex-software.imgix.net/logs/site/themes-3.png)
Debug logs are a key tool in triaging and profiling on the Lightning Platform (formerly ) both in development and production.