SF-PD2 Testing, Debugging, and Deployment Practice Question
Exhibit
{
"settings": {
"apex": {
"debug": "none"
}
}
}Refer to the exhibit. A developer wants to enable log filtering for a specific package. Where should this configuration be managed?
⚠ Common exam trap
Candidates often look for log settings inside the Apex class or Trigger code, not realizing that debug levels are managed globally via the Setup menu, not within the source code.
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
✓
In the Debug Logs section under Setup.
Log filtering and debugging levels are managed within the Salesforce Debug Logs setup. While the provided JSON snippet represents a configuration style, Apex debug settings are specifically controlled through the 'Debug Logs' section in the Setup menu, where trace flags define the granularity of logs for specific users, classes, or triggers to prevent log exhaustion.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
In the sfdx-project.json file.
Why it's wrong here
The sfdx-project.json file manages project-level configuration, such as API versions, package directories, and plugin settings. It is not used for defining runtime debug levels or log filtering for org-wide Apex execution. Using this file for runtime configuration would have no impact on the logging behavior of the org.
- ✓
In the Debug Logs section under Setup.
Why this is correct
The Debug Logs area in the Setup menu is the official location to set trace flags and debug levels. This allows developers to control log verbosity for specific users and Apex components. Managing logs here ensures that debug information is captured efficiently without impacting system performance or exceeding storage limits.
- ✗
In the Custom Metadata Types settings.
Why it's wrong here
Custom Metadata Types are used for application configuration and logic control, not for infrastructure-level debugging settings. Storing debug flags in Custom Metadata would require custom code to read and enforce these settings, which is unnecessary and inefficient given the platform provides dedicated tools for log management and trace flags.
- ✗
In the Apex Class definition file.
Why it's wrong here
Apex classes do not contain logging level configurations. Logging is an environmental setting managed by the platform to allow dynamic changes without modifying code. Hard-coding debug settings in classes would require a deployment every time you need to change log levels, which is a poor architectural practice for troubleshooting.
About these practice questions
One of 226 original SF-PD2 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.