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!
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
Matthew Ferris2,981 Points
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?
Javier Alvarado16,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.
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.