And the build is going to happen and the simulator's going to launch.
And it happens very quickly, so I'm sorry, this is a command line program so
there's no simulator.
It happens very quickly so what we see is that our breakpoint has been hit as
indicated by this green line and saying breakpoint over here.
And we can look over here in our navigator.
If we look under our debug pane in our navigator,
we can see that the thread that's running our code, located here, has
a stack that consists of a starting frame, our main function, which was called here.
Our main function called dayGreeting.
So daygreeting is next on the stack and then,
currently allDay is being run, and so allDay is on the stack.
What we can do is we can look and see within each one of those frames in
the scopes that it defines what variables are present and what their values are.
We call main, main call dayGreeting.
Well what's true about the variables in dayGreeting.
If we click on dayGreeting and then look down here in our lower navigation pane,
we can see that when allDay was called, loops was equal to 2.
Well that makes sense, because we called dayGreeting with 2.
And then we were going through this loop, and
on the current stack that we are executing, we can see that i equals 0.
Hm, that's interesting!
So now let's click on allDay.
If we click on allDay, we see that there's nothing down here, and
so that's because there are no variables defined within this frame, but
we can use these command buttons down here to debug the program in different ways.
This will execute the line and go to the next one within the current frame.
This will step into the next frame if necessary.
That means we'll call goodDay with morning and we'll step into it.
Let's click that one.
You can see that when we did that,
it added another frame to our stack, the one for goodDay.
There is a variable defined here, which is time of day which was passed.
We can see that that time of day is this string, morning.
And if we step over that call by clicking on this button here.
We'll see that time of day gets printed over on our console.
We get to the end of goodDay.
If we use this command here to step up in to the next frame or
continue executing our program until we leave this frame.