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

Apex Log Finder

Sarthak Ghosh

|
8 installs
| (0) | Free
Fetch latest N number of Apex logs(upto 100) via sf CLI, search any String and highlight the exact matches in green tick in Folder level.Also Bulk delete from Org level is supported
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 Visual Studio Code extension that integrates with the Salesforce CLI (sf) to help developers and QA engineers quickly fetch and analyze Apex debug logs.
It provides four main commands:

  • Apex Logs: Fetch Latest Debug Logs: Download the most recent Apex logs from your default Salesforce org.
  • 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).
  • ✅ 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.

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 us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft