debugging-apex-logs

Analyzes Salesforce Apex debug logs to detect governor limits and bottlenecks.

Updated Jun 1, 2026
One-click install
npx skills add https://github.com/Collabalist/SFDC --skill debugging-apex-logs-collabalist
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debugging-apex-logs
Source: https://github.com/Collabalist/SFDC/tree/main/.agents/skills/debugging-apex-logs
Command: npx skills add https://github.com/Collabalist/SFDC --skill debugging-apex-logs-collabalist

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps diagnose performance bottlenecks in Salesforce Apex code by analyzing debug logs, detecting governor limits, and suggesting code fixes.

Core Features & Use Cases

  • Log Analysis: Parse and analyze Apex debug logs to identify slow queries, governor limits, and other performance issues.
  • Governor Limit Detection: Monitor SOQL, DML, CPU, and heap limits to prevent performance bottlenecks.
  • Performance Analysis: Analyze query plans and identify expensive operations.
  • Agentic Fix Suggestions: Automatically suggest code fixes to optimize performance.
  • Use Case: Use this Skill to analyze debug logs after a performance issue is detected in a Salesforce org.

Quick Start

Use the debugging-apex-logs skill to analyze the latest debug log for errors in the org 'dev'.

Frequently Asked Questions about debugging-apex-logs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze Salesforce Apex debug logs for performance issues?

To analyze Salesforce Apex debug logs for performance issues, you can use an automated tool to parse the logs, identify slow queries, detect governor limits, and suggest code fixes to optimize performance.

What causes governor limit bottlenecks in Apex code and how do I detect them?

Governor limit bottlenecks in Apex code are caused by excessive SOQL, DML, CPU, or heap usage. You can detect them by monitoring debug logs to identify which operations are approaching or exceeding these platform limits.

How do I optimize slow SOQL queries identified in Salesforce debug logs?

To optimize slow SOQL queries identified in Salesforce debug logs, analyze the query plans within the logs to find expensive operations, then apply suggested code fixes to streamline data retrieval and reduce performance bottlenecks.

Do I need access to a Salesforce org to debug Apex performance bottlenecks?

Yes, you need access to a Salesforce org and its debug logs to diagnose Apex performance bottlenecks, as the analysis requires parsing actual log data generated from your org's execution context.

What is the best way to find and fix CPU time limits in Apex logs?

The best way to find and fix CPU time limits in Apex logs is to analyze the debug logs for expensive operations and automatically apply suggested code optimizations to reduce CPU consumption and prevent bottlenecks.

Why does my Apex code hit heap size limits and how can I troubleshoot it?

Apex code hits heap size limits when memory usage exceeds platform constraints. You can troubleshoot this by analyzing debug logs to detect heap limit warnings and applying code fixes to optimize memory allocation.