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 (Retired) Fundamentals of C Operators and Expressions

Ryan Hedges
Ryan Hedges
6,079 Points

main.c not running when changes are made

I download and open the given project file. I run it using the play button in the top left and I see hello world printed out. I then make the following changes based on the very first set of instructions in this video.

#include <stdio.h>

int main()
{
    int apple = 9;
    printf("a %d\n", apple);
    return 0;
}

The program returns something called "(lldb)" and shows me information about cpu and memory usage. What is going on? Why isn't Xcode responding the same way that it does for the instructor in the video?

alt text

2 Answers

Stone Preston
Stone Preston
42,016 Points

looks like you may have set a few breakpoints accidently. Select debug from the xcode menu, then select deactivate breakpoints and try running it again and see if it works. If you want to remove those break points completely (they are the little blue arrow things on the left side of the editor) you can right click on them and delete them.

Ryan Hedges
Ryan Hedges
6,079 Points

Well that's just silly. It was totally that.

Looks like I must have left clicked that sidebar at some point which created those two breakpoint in the image. But hey, now I sorta know about breakpoints! Thank you