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.


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 live online training, plus books, videos, and digital content from nearly 200 publishers.