Up and Running
25
6. To allow execution to return to
main
, select
Debug
4
Step Out
. By
default, the keyboard shortcut for step out is F8.
7. Inspect the Autos window at the bottom of the
main.cpp screen. You can
see the current value of some of the important variables, as shown in
Figure 1-9.
Figure 1-9: The Autos window shows the values of variables at the current breakpoint.
You can see
num1
is set to 42 and
result1
is set to 1. Why does
num2
have a gibberish value? Because the initialization to 0 hasn’t happened
yet: it’s the next instruction to execute.
The Xcode debugger supports many more features. For more informa-
tion, check out the Xcode documentation link at
https://ccc.codes/.
Dostları ilə paylaş: