23.6 · Console, sysdiagnose and reproducing a bug

A bug you cannot reproduce is a bug you cannot fix. Most of the skill is recreating the user’s situation: their data, their settings, their network, their OS, and reading what the system recorded.

Mental model. Capture the environment, not just the steps: build, OS, flags, locale, network and data. Then make the environment something you can set on purpose.

What the device recorded

Console, the log command and sysdiagnose.

  1. What is a sysdiagnose, how do you use Console.app and the log command, and what should you ask a user or tester to send? 23.6.1 · L3
    A sysdiagnose is a bundle of system diagnostic data gathered at one moment: the unified logs, crash and hang reports, process snapshots (spindumps), memory and…

Recreating the situation

Simulator tools, flags, seeded data and network conditions.

  1. How do you reproduce a bug reliably: environment, feature flags, seeded data, launch arguments, simulator tools and network conditions? 23.6.2 · L3
    Start by writing down what could differ between your machine and the failure: the build (version, configuration, which commit), OS and device, the user’s…

More in Debugging & Instruments