Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Objective-C Basics Introduction to Operators and Conditionals Switches a la Enum

Variable information during Breakpoints.

I've noticed that in some cases when a breakpoint is hit, the variable information in that current state is displayed in the lower left panel, but in other cases it is not. Why is that?

If you don't see it try step over to see if that helps display it. Its two buttons over from the break point at the bottom.

1 Answer

Javier Alvarado
Javier Alvarado
16,060 Points

I asked this same question on a previous video from this section but I think I know why now. My best guess is that the variable information is displayed as long as the "return 0" line has not been executed. You can see this happen in the "Else If" video. Gabe (the instructor) sets up 2 breakpoints and steps through the code line by line several times. Before the "return 0" line is reached, the panel displays the variable values, but when it is reached, they disappear. I'm not entirely sure why it behaves this way, but that seems to be what triggers it.