Salesforce Certified Platform Developer II — Question 202
A developer recently released functionality to production that performs complex commission calculations in Apex code called from an Opportunity trigger. Users report that the calculations seem incorrect because the values they see for commissions are wrong.
The developer has representative test data in their developer sandbox.
Which three tools or techniques should the developer use to execute the code and pause it at key lines to visually inspect values of various Apex variables? (Choose two.)
Answer options
- A. Apex Replay Debugger
- B. Visual Studio Code
- C. Workbench
- D. Developer Console
- E. Breakpoints
Correct answer: B, D
Explanation
Visual Studio Code and Developer Console are both effective tools for debugging Apex code, allowing the developer to set breakpoints and inspect variable values. The Apex Replay Debugger is more suited for analyzing previously recorded debug logs, while Workbench is primarily used for data manipulation and queries, making them less appropriate for this specific debugging scenario.