Advanced 30 min read

Logging and Debugging Production Issues

By the end of this lesson, you'll be able to:

  • Apply Module 33's debugging skills specifically to a live production issue
  • Explain why production debugging has different constraints than a dev-org investigation
  • Use debug logs strategically without disrupting real users

Prerequisites: "Writing a Technical Design Document"

Why production debugging is different

In a dev org, adding a checkpoint (Module 33) or turning on maximum-verbosity logging (Module 33's log-level lesson) has zero real cost. In production, the exact same actions could slow down real users' transactions or generate an enormous volume of logs across every user's activity — production debugging needs to be surgical, not exploratory.

Scoping a debug log to one specific user

Setup → Debug Logs → New
User: [the specific affected user]
Apex Code: DEBUG (not FINEST — Module 33's "choose deliberately" lesson, applied here with real stakes)

Rather than turning on org-wide verbose logging (affecting every user's performance), scoping a debug log trace flag to one specific user — ideally the one actually reporting the issue — captures exactly what's needed with minimal impact on everyone else.

Reading a production log with the same skill, higher stakes

Once a log is captured, Module 33's "scan for EXCEPTION_THROWN, work backward" technique applies identically — the skill doesn't change, but the stakes do: a production issue affecting real users deserves faster, more careful triage than a dev-org curiosity, and often benefits from the next lesson's incident-response process running in parallel with the actual debugging.

Exercise

As a comment, explain why turning on FINEST logging for every user in production would be a worse choice than scoping a debug log to one specific affected user.

Show hint

Think about the actual cost to real users versus the benefit gained.

APEX

Logging and Debugging Production Issues Quiz

1. Why does production debugging need to be more surgical than dev-org debugging?

Log in to submit the quiz and save your score.

My Notes

Log in to keep private notes on this lesson.

Questions about this lesson

No questions yet — be the first to ask.

Log in to ask a question about this lesson.

Summary

This lesson applies Module 33's debugging toolkit specifically to production — where real users are actively affected, and the constraints are genuinely different from investigating an issue in a dev org.