Instrumentation

Errors that do not result in an exception but rather make the application exhibit incorrect behavior are called silent logical errors. To investigate such errors, you must add to your real code extra debugging code that informs you of the code's internal state. This is also known as instrumenting your code.

Before we look at instrumentation, it is important to review a fundamental debugging concept: breakpoints.

Breakpoints

When you observe unexpected results while testing your application, you will have an idea approximately where in your code the error occurs. Maybe you can guess the method or the class that causes the error. In a worse-case scenario, you'll be able to guess which boundary method is called when the undesired behavior ...

Get Microsoft® Mobile Development Handbook 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.