Apex Debug Log Parser
Live: spskelly.github.io/apex-log-parser
Repo: GitHub
What It Does
Salesforce debug logs are dense walls of text. This tool turns them into something you can actually read, color-coded by event type, filterable by category, searchable, with governor limits visualized as progress bars. Everything runs client-side; logs never leave your browser.
Features
Parsing & Visualization
- Line-by-line classification, each log line gets categorized into one of 12 event types (SOQL, DML, Debug, Code Unit, Error, Validation, Workflow, Flow, Callout, Limit, System, Header), each with a distinct color
- Debug level badges,
USER_DEBUGlines show their level (ERROR, WARN, INFO, DEBUG, FINE, etc.) with color coding - Entry/exit pair linking, click a badge on any begin event to highlight the matching end event, with the entire scope range highlighted between them
- Log metadata extraction, debug level settings parsed from the header
- Execution time calculation, computed from nanosecond timestamps
Filtering & Search
- Category filter chips, toggle any combination of event categories; chips show event counts per category
- Full-text search, search across all content with highlighted matches and live match count
- Hide System events, one-click toggle to suppress noise (
HEAP_ALLOCATE,STATEMENT_EXECUTE,VARIABLE_ASSIGNMENT) - Composable filters, category, search, and system toggle all work together
Governor Limits
- Automatic extraction,
LIMIT_USAGE_FOR_NSblocks parsed into structured data - Progress bar visualization, color-coded by severity (green <40%, orange 40-70%, yellow 70-90%, red 90%+)
- Full limit coverage, SOQL queries, query rows, DML statements, DML rows, CPU time, heap size, callouts, email invocations, future calls, queueable jobs, and more
Statistics Dashboard
- SOQL query count and total rows returned
- DML operation count and rows affected
- Debug log count, errors and warnings
- Total execution time in milliseconds
- Debug level configuration from log header
Performance
- Chunked rendering, large logs render in 2,000-line chunks with IntersectionObserver for lazy-loading as you scroll
- Debounced search, 150ms debounce keeps the UI responsive on large logs
Input Methods
- Paste, auto-parses when content exceeds 500 characters
- Drag and drop,
.log,.txt, or.debugfiles - File browser, standard file picker
- Sample log, built-in example demonstrating all features
Privacy
Everything runs client-side. Logs are never uploaded, transmitted, or stored anywhere outside your browser. The service worker caches only the app’s own assets.
Technical Details
~1,550 lines across 4 files (index.html, app.js, styles.css, sw.js). No build step, no framework, no dependencies. The parser handles the full Salesforce log format including nested code unit scopes, governor limit blocks, and the various debug level classifications.