My Library Blog Newsletter Programs
Log In
← Back to all posts

April 2025 Apex Insider Newsletter

by Adrienne Millican, Warren Walters
Apr 01, 2025
Connect

Debug Apex Code Faster by Filtering Debug Logs in VS Code

Debugging code is an essential part of the development process. But if you’ve ever worked with Salesforce’s debug logs, you know they contain huge amounts of information. Finding just the System.debug statements you may have put in your code or just the variable assignment that you are interested in can be a long and tedious task. Fortunately, there are tools to assist you in focusing on just the log lines you want.

Tools for Finding the Needle in the Debug-Log Haystack

Visual Studio Code (VS Code) offers two tools to assist you in finding the information you are looking for within a debug log:

  1. The first method, which has been around for a while, is the Apex Log Replay Debugger. This is a powerful tool that allows you to replay a debug log one code statement at a time. You could use it to find a certain debug statement or other line of interest in your code, but it takes some setup and training to use effectively.
  2. The second is brand new and requires no training: the new Output pane text-filter feature. In the default VS Code configuration, Output is one of the selections on the bottom center of the window, while the Filter text box itself is nearer to the bottom right as shown by the highlights in the following screen capture:How to Locate the Output Pane and Filter Text Box
 

How to Use the New VS Code Output Text Filter

Using the text filter is very easy and intuitive. You don’t even have to turn on logging first or set Salesforce to record debug logs beforehand. The filter itself is an unlabeled text box, but hovering over it displays the label “Filter”.

Use the VS Code text filter feature in Output by doing the following:

  1. After executing Apex in VS Code, open the Output pane. You should see the results of the execution in that pane.

  2. Enter the text you wish to highlight and filter on into the Filter text box. For example, in the image shown in the following screen capture, the word “Exception” is the word in the Filter text box. The drop-down list box to the right of the filter sets itself automatically to “Apex” when you execute Apex code.

    You do not need to press Enter. VS Code begins filtering on text as soon as you enter it into the text box. The filter matches the text you entered whether it is a distinct string or part of a larger string. In the following screen capture, observe that the instances of the word “Exception” and “exception” are isolated and highlighted in orange in the debug log, even though the filter entry is “EXCEPTION”. Thus the filtering algorithm is not case-sensitive.

VS Code keeps a record of your entries in the filter for your session. Use the up and down arrow keys while the cursor is in the Filter text box to page through the entries in the filter for that session.

Warren’s Thoughts: TDX25 Connections

I went to TrailblazerDX 2025 (TDX25), the Salesforce conference for Admins and Developers, when it came to the US on March 5 and 6. The best minutes I spent were the ones I spent talking to people. Yes, you can rush from session to session, but I think the real value of the conference is in walking the floors and talking to other attendees. For me, connecting with real people was what TDX25 was all about.

It's especially great meeting Cloud Coders in person. TDX25 got people out of the Zoom window and into real life. I could have grilled them on trigger best practices, but instead I just asked them how to improve the program.

Some shoutouts: I connected with Mike Chandler and we've got some cool stuff cooking up. I also hung out with Saman Attar and got updates on what's new with Camp Apex. And there's always trouble when Chase Brammer and I are together.

 

First Impressions: Salesforce Deployments using Salto.io

At TDX25, I also made sure to stop by the Salto booth to see Julian Joseph. Julian is my go-to resource for Salesforce DevOps and deployments.

Here is a video with my thoughts on Julian’s DevOps solution, Salto.io:

Salesforce Deployment Using Salto.io | First Impressions

Cloud Coder Wins in March

  • Patrick Sees passed the Platform Developer I exam and became an Application Architect!
  • Kimberly Belliveau passed the Platform Developer I exam!
  • Stephen Church changed his job from being a Salesforce Admin to a Salesforce Engineer!

 

💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡💡

Want to be like the Cloud Coders that had big wins in March?

They all got started with the legendary Salesforce Developer 101 course.

Jump in here at cloudcodeacademy.com/101

Already have the 101?

Get the Trigger, SOQL, and Apex Fundamentals course bundle

 

Responses

Join the conversation
t("newsletters.loading")
Loading...
June 2025 Apex Insider Newsletter
Hello there, all budding Salesforce Devs! Summer beckons, and so does the June 2025 edition of Apex Insider.   Warren’s Wisdom: How to Improve Your Coding….without Coding While practicing coding is the best way to directly improve your coding skills, there are also indirect ways to improve your skills. Here are some habits to adopt that will improve not only your coding, but your life overall: ...
May 2025 Apex Insider Newsletter
Hello there, all budding Salesforce Devs! Welcome to the May 2025 edition of Apex Insider. Advantages of Queueable Apex over Future Methods Asynchronous (async) processing is essential for developing robust Salesforce applications that handle complex workloads efficiently. While Salesforce offers more than one asynchronous solution, including the Batch interface and @future methods, Queueable A...
March 2025 Apex Insider Newsletter
  API Key Scopes: The Missing Piece in Your Integration Puzzle It’s frustrating when all of your integration code is correct, but the endpoint/system you’re accessing still isn’t cooperating. The reason might be that your API key isn’t scoped correctly…. Why API Key Scopes Matter As you probably remember, an API key is a unique alphanumeric string used to identify and authenticate an ap...

Apex Insider

Apex Insider is your essential monthly resource for staying ahead in the Salesforce ecosystem. Each issue delivers practical development tips, platform updates, and success stories from the community. Expertly curated by Warren Walters, Salesforce MVP, and the Cloud Code Community, this newsletter provides the insights you need to enhance your Salesforce development skills and drive business value. Subscribe today to join professionals who rely on our content to navigate the evolving Salesforce landscape with confidence.
© 2025 Cloud Code

Join Our Free Trial

Get started today before this once in a lifetime opportunity expires.