SF-PD2 Testing, Debugging, and Deployment Practice Question
A developer is debugging an Apex class that is failing in production. The developer wants to capture debug logs for a specific user without affecting other users. Which tool should be used to set up a trace flag for that user?
⚠ Common exam trap
A common mix-up: candidates confuse tools like Developer Console or Workbench with the Setup Debug Logs interface, which is the correct place to set trace flags for other users.
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
✓
Setup Debug Logs
To capture debug logs for a specific user, a developer should use the Debug Logs page in Setup. There, they can create a trace flag for that user, specifying the log levels and duration. This isolates the logging to that user, avoiding impact on others. Other tools like Developer Console are for personal debugging, and Audit Trail is for configuration changes.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Setup Audit Trail
Why it's wrong here
Setup Audit Trail tracks configuration changes in the org, not debug logs. It does not allow setting trace flags or capturing debug logs. It is used for compliance and monitoring changes. This tool is not relevant for debugging Apex failures. Therefore, it is incorrect.
- ✓
Setup Debug Logs
Why this is correct
In Setup, under Debug Logs, you can create trace flags for specific users. This allows you to capture debug logs for that user without affecting others. You can set the log level and expiration. This is the standard way to set trace flags for a user. It meets the requirement precisely.
- ✗
Workbench
Why it's wrong here
Workbench is a powerful tool for many administrative tasks, but it does not provide a direct interface for setting trace flags. You can use Workbench to view logs, but setting a trace flag for a specific user is typically done via Setup or the Tooling API. Workbench is not the primary tool for this task.
- ✗
Developer Console
Why it's wrong here
The Developer Console allows you to view logs for your own user session, but it does not easily allow setting trace flags for other users. It is more suited for interactive debugging of your own actions. To set a trace flag for a specific user, you need a tool that can manage trace flags, such as Setup or Workbench. Developer Console is not the best choice for this scenario.
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 →
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.