Graphics Programs Reference
In-Depth Information
(If you don't see the variables view, find the control above the console.
Click the center button to see both the console and the variables view.)
In the variables view, a pointer variable shows the object's address in memory. (There are
some exceptions; for an NSString , the actual string is shown instead.) A variable that is
not a pointer, like int , just shows its value.
Click the disclosure button next to self . The first item under self is its superclass. In
the context of this method, self is a pointer to the instance of WhereamiViewCon-
troller , so its superclass is UIViewController . Clicking the disclosure button
next to UIViewController will show the variables self inherits from its superclass.
After the superclass, the object's instance variables are listed, which for Wheream-
iViewController is just locationManager . The breakpoint is set to the line that
creates the instance of CLLocationManager and assigns it to locationManager .
That line of code has yet to be executed, so locationManager is still set to nil
( 0x0 ).
Stepping through code
In addition to giving you a snapshot of the application at a given point, the debugger also
allows you to step through your code line by line and see what your application does as
each line executes. The buttons that control the execution are on the debugger bar that sits
between the editor area and the debug area ( Figure 4.12 ) .
Figure 4.12 Debugger bar
 
Search WWH ::




Custom Search