Skip to content
| Marketplace
Sign in
Visual Studio Code>Debuggers>Apex Log FinderNew to Visual Studio Code? Get it now.
Apex Log Finder

Apex Log Finder

Sarthak Ghosh

|
120 installs
| (0) | Free
A powerful VS Code extension to fetch,search and manage Salesforce Apex debug logs using the SF CLI.Download latest or user-specific logs from recently logged-in users in org,search and highlight exact matches with green ticks ✔,clear local logs, and bulk delete logs from the org.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🚀 Apex Log Finder VS Code Extension

Overview & Command

Apex Log Finder is a powerful Visual Studio Code extension that integrates with the Salesforce CLI (sf) to help developers and QA engineers efficiently fetch, manage, search, and analyze Apex debug logs directly from their default Salesforce org.

The extension allows you to download the latest Apex logs on demand, store them locally in a dedicated workspace folder, perform fast full‑text searches across all logs without opening files, and visually highlight matches for improved readability—especially optimized for VS Code dark themes. It also supports bulk log deletion from the org, local log cleanup, progress tracking, error notifications, and controlled concurrent downloads to ensure better performance and a smooth developer experience.

Version License Status Last Updated Vscode Salesforce

Prerequisites

Before setting up the Apex Log Finder for VS Code, ensure the following requirements are met:

  • ✅ Salesforce Extensions for Visual Studio Code and Salesforce CLI
    Install the official Salesforce Extension Pack and Salesforce CLI(SF Version) to enable Salesforce development features.

  • ✅ Visual Studio Code (v1.105 or higher)
    Make sure you are using Visual Studio Code version 1.105 or higher.

  • ✅ Try to Use Dark Theme to get Better View
    Make sure you are using Visual Studio Code Dark theme for development.

  • ✅ Use Salesforce Project Workspace Folder Containing sfdx-project.json File
    Make sure you are using Visual Studio Code Standard Salesforce Project With Manifest (sfdx-project.json) directory.


✨ It provides five main commands:

  • Apex Logs: Fetch Latest Debug Logs🧾: Download the most recent Apex logs from your default Salesforce org.
  • Apex Logs: Fetch Latest Debug Logs By User👤: Download the most recent User Specific Apex logs from your default Salesforce org.It will show only recently logged-in user in the list.
  • Apex Logs: Search & Highlight🔍: Search for a specific string across all downloaded logs and highlight matches in green.
  • Apex Logs: Clear Local Logs🧹: Clear Downloaded Apex log locally from folder.
  • Apex Logs: Delete All Logs From Org🗑️: Delete Apex log from Org Level using Bulk API.

This extension is designed to streamline log inspection, error tracking, and debugging workflows directly inside VS Code.


✨ Features

  • ✅ Fetch the latest N number of Apex logs (user input, up to 100).
  • ✅ Fetch the latest user‑specific Apex debug logs from the org by selecting a user.
  • ✅ Automatically saves logs into a workspace folder named ApexLogs.
  • ✅ Uses the current default org (no need to specify aliases).
  • ✅ Search across all downloaded logs for a given string.
  • ✅ Highlights all matches in green for easy visibility. [Best View Suitable for VS Code Dark Theme]
  • ✅ Displays progress and error messages in VS Code notifications.
  • ✅ Fetch logs with a progress bar that updates incrementally.
  • ✅ Concurrency control (up to 5 logs at a time) for faster downloads.
  • ✅ Search logs without opening them, marking matched files in the Explorer with a green ✔ badge.
  • ✅ Delete the Logs from Org level using Bulk API.
  • ✅ Clear the Downloaded Apex log From Local folder.
  • ✅ A small icon(Dynamic) has been added to the VS Code status bar to indicate when a command is in progress

Screenshots for All Steps

Available Commands

Commands.png

Fetching Logs

Fetch_Apex_Log.png

Folder Structure

[Folder_Structure.png]

Search & Highlight Steps

Search_Highlight_Command.png

Apex_Log_Highlight.png


⚠️ Error Handling

Below are common error messages, their causes, and solutions:

Error Message Cause Solution
"No default Salesforce org connected" Extension checks sf org display --json and finds no default org. Run sf org login web and set a default org with sf org set default.
"Open a workspace folder to create ApexLogs" No workspace folder is open in VS Code. Open a folder in VS Code before running commands.
"No Apex logs found in the default org" The org has no recent debug logs. Execute Apex code or enable debug logging in Salesforce, then retry.
"No .log files found in ApexLogs" Search command run before fetching logs. Run Apex Logs: Fetch Latest Debug Logs first.
"Failed to parse JSON output from sf CLI" CLI output not valid JSON (e.g., CLI error). Ensure sf CLI is installed and working. Test with sf apex log list --json in terminal.
"Failed to fetch logs:" CLI command failed (e.g., invalid org, network issue). Verify org connection and CLI installation.

Dependencies

  • ✅ Salesforce Standard API consumtion is there during bulk delete from org.

  • Before using this extension, ensure you have:

  • Node.js (v18+ recommended)

  • Visual Studio Code (v1.107.0+)

  • Salesforce CLI (sf) installed
    Install instructions

  • A connected default Salesforce org

    sf org login web
    sf org set default --target-org <alias-or-username>
    
    
    

📬 Contact for Issues and Support : ➡️ Email

🤝 Connect with Me

Feel free to connect with me through the platforms below:

GitHub LinkedIn Portfolio

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft