Testing, Debugging, and Deployment20% of the exam

Debugging with logs and monitoring async jobs and flows

How trace flags, debug levels and debug logs capture a transaction, how to read a log for limits and performance, when to use checkpoints and the Apex Replay Debugger, and how to monitor batch, Queueable and future jobs (Apex Jobs, Flex Queue, AsyncApexJob) and failing flows.

Official exam objective
Describe how to approach debugging system issues and monitoring flows, performance, asynchronous, and batch jobs.

~8 min read · 12 practice questions ·

What the exam expects

  • Capture the right debug log: set a trace flag on the user, class or trigger with a debug level that raises the categories you need and lowers the rest.
  • Read a log for execution order and cumulative limit usage, and fix CPU and query problems it reveals.
  • Choose between Developer Console checkpoints and the Apex Replay Debugger to inspect variable state.
  • Monitor batch, Queueable, scheduled and future jobs with Apex Jobs, the Apex Flex Queue and AsyncApexJob, and pick the async type that makes a job monitorable and scalable.
  • Surface and debug flow failures with error emails, fault paths, the Monitor tab and the Flow Builder debugger.

Key terms: trace flag (switches on logging for a user, class or trigger for a time window); debug level (a set of log levels per category, such as Apex Code FINEST); checkpoint (a heap snapshot taken the first time a chosen line runs); AsyncApexJob (the record behind every queued job); flex queue (where batch jobs wait in Holding status).

Key facts

When logs are generated
Detail
Active user trace flags, Apex test runs, requests with debugging headers
CLASS_TRACING trace flag
Detail
Overrides levels for a class or trigger; can't generate a log alone
Log size and retention
Detail
20 MB per log; system logs 24 hours, monitoring logs seven days
CPU time limit
Detail
10,000 ms synchronous, 60,000 ms asynchronous
Developer Console checkpoints
Detail
Up to five; captured once per line
Replay Debugger checkpoints
Detail
Up to five; expire after 30 minutes; one log at a time
Apex Jobs page window
Detail
Jobs submitted in the past seven days; older via AsyncApexJob
Apex Flex Queue
Detail
Up to 100 Holding batch jobs; five queued or active at once
System.enqueueJob limit
Detail
50 per synchronous transaction, 1 per asynchronous one
Flow error email recipient
Detail
Admin who last modified the flow or Apex exception email recipients
Sources for this section (9)
  • Why doesn't running the failing DML in Execute Anonymous reproduce another user's error?
  • When is a CLASS_TRACING trace flag enough to produce a log?
  • What status does a batch job show while it waits in the Apex Flex Queue?
  • Why use Queueable rather than a future method for work you must monitor and chain?

The questions are free to read. Answers with their sources and self-grading are included with the pack.

Keep reading with the Platform Developer pack

  • Core concepts
  • Exam traps
  • Worked scenario

The pack includes:

  • All 21 lessons of the Platform Developer guide, with reading progress
  • Interactive decision walks and step-by-step sequence steppers
  • Inline practice questions and one-click topic practice (12 questions for this lesson)
  • An official source cited for every claim
  • An AI tutor that answers from the guide
  • Unlimited timed practice exams

Practice for the Platform Developer exam