Copyright ã1996 by NeXT Software, Inc.  All Rights Reserved.

;DebuggingObjectAllocationAndDeallocation.rtfd;;¬  Next Section	;NavigatingUsingTheStack.rtfd;;¬  Previous Section

Examiningthevalueofavariableoranobject;¬Examining the value of a variable or an object

1	If the program is running, click the Suspend button to suspend it. 

2	Select the variable in the Project Builder main window.

3	In the Launch panel, click the object button if the variable is an object. 

Or

3	Click the * button if the variable is a pointer.

Or

3	Click the Print button. 

The three rightmost Debugger buttons print the values of variables or expressions.

¬

The first of the three buttons (the Print button) prints the value of a variable or expression if it's not a pointer or an object. If the variable (or the result of the expression) is a pointer, the Print button prints the address. Usually, you want to know the value at that address, not the address itself. In that case, use the next button over (the one with a dereference symbol), which prints the value pointed to by the selected variable. Similarly, use the button with a cube (the Print-object button) instead of Print to see the information about Objective-C objects. 

Related Concept:   ;DebuggingConcepts.rtfd; linkMarkername GettingUsefulInformationFromPrint-object;,  Getting Useful Information From Print-object

Related Concept:   ;DebuggingConcepts.rtfd; linkMarkername FortheExperts:MoreonExaminingVariables;,  For the Experts: More on Examining Variables