SFDXLogMate - Salesforce Log Manager for VS Code
Download and search Salesforce debug logs directly in Visual Studio Code.
Features
- 📥 Bulk Download: Download all debug logs from your Salesforce org
- 🔍 Advanced Search: Full-text and regex search across all downloaded logs
- 📊 Tree View: Organized view of logs grouped by date
- 💾 Local Storage: Logs stored locally for offline access
- ⚡ Fast Navigation: Click to open logs, jump to search results
- 🔄 Auto-sync: Optional automatic synchronization of new logs
Installation & Setup
Prerequisites
- Visual Studio Code 1.80.0 or higher
- Node.js 16.x or higher
- npm 8.x or higher
- A Salesforce account with API access
Setup Instructions
Navigate to the project directory:
cd C:\Users\sunee\SFDXLogMate
Install dependencies:
npm install
Compile TypeScript:
npm run compile
Launch Extension in VS Code:
- Press
F5 in VS Code to open Extension Development Host
- OR from Command Palette (
Ctrl+Shift+P): "Debug: Start Debugging"
Usage
First Time Setup
- Open Command Palette (
Ctrl+Shift+P or Cmd+Shift+P)
- Run:
SFDXLogMate: Authenticate with Salesforce
- Enter your credentials:
- Username (e.g., user@example.com)
- Password
- Security Token (if required)
- Select instance type (Production/Sandbox)
Download Logs
Download All Logs:
- Command Palette →
SFDXLogMate: Download All Logs
- Downloads all available logs from Salesforce (up to 1000)
Download Recent Logs:
- Command Palette →
SFDXLogMate: Download Recent Logs (Last 24h)
- Downloads only logs from the last 24 hours
Search Logs
- Command Palette →
SFDXLogMate: Search Logs
- Enter your search term
- Choose search type:
- Plain Text: Simple text search
- Regular Expression: Advanced pattern matching
- Browse results and click to jump to the specific line
Browse Logs
- Open the SFDXLogMate view in the Activity Bar (left sidebar)
- Logs are organized by date
- Click any log to open it in the editor
- Use the refresh button to update the list
Configuration
Access settings via: File > Preferences > Settings > Extensions > SFDXLogMate
Available settings:
- Instance URL: Salesforce login URL (default: https://login.salesforce.com)
- API Version: Salesforce API version (default: 60.0)
- Max Concurrent Downloads: Number of parallel downloads (default: 5)
- Auto Refresh Interval: Minutes between automatic syncs (default: 0 = disabled)
- Log Retention Days: How long to keep local logs (default: 7)
Commands
All commands available via Command Palette (Ctrl+Shift+P):
SFDXLogMate: Authenticate with Salesforce
SFDXLogMate: Download All Logs
SFDXLogMate: Download Recent Logs (Last 24h)
SFDXLogMate: Search Logs
SFDXLogMate: Refresh Log List
SFDXLogMate: Clear Local Cache
Development
Project Structure
sfdxlogmate/
├── src/
│ ├── extension.ts # Main entry point
│ ├── services/
│ │ ├── salesforceService.ts # Salesforce API integration
│ │ ├── logStorageService.ts # Local storage management
│ │ ├── logDownloadService.ts # Download orchestration
│ │ └── searchService.ts # Search functionality
│ ├── providers/
│ │ └── logTreeProvider.ts # Tree view provider
│ └── types/
│ └── index.ts # TypeScript interfaces
├── package.json
├── tsconfig.json
└── README.md
Build Commands
- Compile:
npm run compile
- Watch mode:
npm run watch (recompiles on file changes)
- Lint:
npm run lint
Debugging
- Open the project in VS Code
- Set breakpoints in TypeScript files
- Press
F5 to start debugging
- Test the extension in the Extension Development Host window
Troubleshooting
Authentication Issues
Problem: "Authentication failed"
- Verify your username and password are correct
- Check if you need a security token (required for API access)
- For sandbox, make sure you selected "Sandbox" as instance type
Security Token:
- Go to Salesforce → Setup → My Personal Information → Reset Security Token
- Check your email for the new token
Download Issues
Problem: "Not authenticated"
- Run
SFDXLogMate: Authenticate with Salesforce first
Problem: Downloads are slow
- Adjust
maxConcurrentDownloads in settings (try 3-10)
- Check your internet connection
- Salesforce API may have rate limits
Search Issues
Problem: No results found
- Make sure logs are downloaded first
- Check your search query spelling
- Try a simpler search term
API Limits
- Salesforce enforces daily API request limits based on your edition
- Each log download counts as one API request
- Logs are automatically deleted by Salesforce after 7 days
- Maximum log size is 5 MB (larger logs are truncated by Salesforce)
Privacy & Security
- Credentials are stored securely using VS Code's Secret Storage API
- Logs are stored locally in VS Code's global storage directory
- No data is sent to any third-party servers
- Logs can be manually cleared using
Clear Local Cache command
License
MIT
Support
For issues and feature requests, please file an issue on the GitHub repository.
Changelog
Version 0.1.0 (Initial Release)
- Basic authentication with Salesforce
- Download all logs or recent logs
- Search functionality with regex support
- Tree view for log organization
- Local storage and caching
| |