Courseiva

SF-PD2 Testing, Debugging, and Deployment Practice Question

A developer is troubleshooting a production issue where a trigger occasionally exceeds CPU time limits. The developer wants to capture detailed debug logs for a specific user without slowing down the entire org, and then analyze the log to identify the slowest operations. Which combination of Salesforce tools should the developer use?

⚠ Common exam trap

The trap here is reaching for Event Monitoring or configuration audit tools, which capture security and setup events rather than the line-level Apex execution timing needed to find a CPU bottleneck.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Debug Logs with a user-specific trace flag, then the Analysis perspective in the Developer Console

A user-specific trace flag generates debug logs only for that user, keeping overhead contained while capturing the problematic transaction. The Developer Console's Analysis perspective then parses the log and ranks operations by execution time, exposing the slowest SOQL, DML, and method calls. This focused capture and analysis directly targets the CPU time issue without impacting other users.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Debug Logs with a user-specific trace flag, then the Analysis perspective in the Developer Console

    Why this is correct

    Creating a trace flag for the specific user captures debug logs only for that user's transactions, avoiding org-wide overhead. The Analysis perspective in the Developer Console parses the log and highlights the slowest operations, such as SOQL queries, DML statements, and method calls, by execution time. Together they let the developer isolate and diagnose the CPU time issue efficiently.

  • ✗

    Event Monitoring via the EventLogFile object, then Workbench to query the logs

    Why it's wrong here

    Event Monitoring captures event log files for security and usage analysis, but it does not provide Apex debug logs with line-level execution details or CPU time breakdowns. Workbench can query EventLogFile records, yet those records lack the granular method timing needed to pinpoint slow Apex operations. This approach cannot identify the specific cause of the CPU time limit breach.

  • ✗

    Setup Audit Trail to identify the user, then Apex Replay Debugger to step through the log

    Why it's wrong here

    The Setup Audit Trail records configuration changes, not runtime behavior, so it cannot identify which user triggered the slow transaction. Apex Replay Debugger is useful for stepping through a captured log, but without a targeted debug log the developer has nothing to replay. This combination does not capture runtime debug logs for a specific user or isolate performance bottlenecks.

  • ✗

    Apex Profiler in VS Code with the Apex extension, then the Timeline view

    Why it's wrong here

    Apex Profiler and a Timeline view are not Salesforce tools for analyzing Apex execution. The Apex extension for VS Code supports Apex Replay Debugger and log retrieval, but it does not include a profiler that captures live production execution. The developer needs a real debug log and a log analysis tool, not an IDE feature that does not exist for this purpose.

About these practice questions

Courseiva writes every SF-PD2 question from scratch — 226 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Salesforce exam blueprint

This SF-PD2 practice question is part of Courseiva's free Salesforce certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SF-PD2 exam.