Suggested answer

Debugging methods:

1. System.debug(): Writes output to debug logs. Use LoggingLevel enum (e.g., System.debug(LoggingLevel.ERROR, 'message');).
2. Debug Logs: Set up via Setup > Debug Logs. Capture logs for a specific user with configurable log levels (Apex, Database, System, etc.). View in Developer Console or VS Code.
3. Developer Console: Built-in IDE with query editor, log viewer, and code editor.
4. Anonymous Apex: Execute code snippets instantly via Developer Console or VS Code for quick testing.
5. Apex Replay Debugger (VS Code extension): Replay a debug log as a step-through debugger, setting breakpoints and inspecting variable values.
6. Checkpoints: Add heap dump checkpoints to capture full variable state at a specific line during execution.

Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.

Community comments (0)

No comments yet.

Sign in or create a free account to add a comment. Comments are moderated before they appear.

Plain text only, 3–2000 characters. A moderator reviews every comment before it is published.