Stratagems

Although every bug is different, certain techniques and approaches have repeatedly proven their value in tracking down a wide range of problems. They won’t suffice for every problem you find yourself faced with, but every programmer should have them at their fingertips.

Instrumentation

Diagnosis is all about information—divining precisely the state of, and the execution path taken by, the software. Although there are many ways through which you can either infer or derive this information, by far the simplest and most direct is adding instrumentation to the software itself.

Instrumentation is code that doesn’t affect how the software behaves but instead provides insight into why it behaves as it does. In the previous chapter, we ...

Get Debug It! now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.