🚀 Apex Log Downloader is a VS Code extension that allows Salesforce developers to quickly download Apex Debug Logs directly into their project workspace using the Salesforce CLI (sf).
This makes it easier to investigate logs for performance issues, exceptions, limits, and custom debug events—without navigating Salesforce Setup or Developer Console.
🔥 Key Features
Capability
Description
⚡ Automatic Org Selection
Detects the default connected Salesforce org in your project (target-org)
🔎 Filter logs
Filter by User Display Name & Request Type
📥 Bulk log download
Download logs in parallel chunks for improved speed
Handles large logs (multi-MB) without buffer overflow
🛠 Requirements
Salesforce CLI (sf) installed and accessible in the system
An authorized sfdc org
VS Code v1.106.0+
🚀 How to Use
Open any VS Code workspace folder
Press Ctrl + Shift + P (or Cmd + Shift + P on macOS)
Run command:
Apex: Download Logs
Provide optional filters:
User Display Name (e.g., John Smith)
Request Type (e.g., Application, API, etc.)
Enter number of logs to download
⚠ Large numbers may consume API call limits.
Logs will begin downloading automatically and you’ll see:
Fetching Apex logs…
Downloading logs 23/100…
Logs are saved to: /logs/*.log
Use VS Code search for debugging: Ctrl + Shift + F → logs/**/*.log
⚠️ API Usage Note
📌 Each log download is considered a Salesforce API request.
If requesting large batches multiple times(e.g., 200+ logs), you may consume daily API limit
🧠 Salesforce CLI Path Resolution
The extension automatically detects sf from:
/usr/local/bin/sf (Mac)
C:\Program Files\sf\bin\sf.cmd (Windows)
sf from PATH
Custom path via VS Code settings:
Settings → Extensions → Apex Log Downloader → Sf Path
🧪 Known Limitations
Does not currently support UI date/time filters
Requires a folder workspace (not empty window)
📦 Release Notes
Version
Changes
0.0.1
Initial release
0.2.2–0.2.7
Filter improvements, large log support, org selection enhancements