I'm playing with a simple console application in Xcode 5, on Yosemite beta. I set a breakpoint and run the program, as in the following screenshot:
As you can observe, the linked list's
head
is not empty, so why the console has not printed anything? Actually, the output WILL appear, but only after this function returns. Why is that?Now in the second image, I just hit return and added a black line. But the debugger does not display the
head
variable already. Why is that?
I can just guess that some kind of optimization is happening behind the scenes. Can anyone elaborate on this?