Use the Debugger

The ContactActivity is finished for now. However, it is difficult to test the recently added functionality because currently it does not retrieve contact data. Therefore, to test that the functionality you just added is working properly you have to watch it run. This is done using the debugger.

The first step in using the debugger is to set a breakpoint. A breakpoint tells the debugger to halt execution at that line of code. This gives you the capability to inspect the values in the variables and step through the code line by line. There are two ways to set a breakpoint. The first is to double-click the light gray vertical bar to the left of the code. This will put a blue dot that represents the breakpoint in the bar (Figure ...

Get Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android 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.