Xcode Issues - cannot read entire program

Discussion in 'Mac Programming' started by sari210, Jun 8, 2009.

  1. macrumors newbie

    Joined:
    Jun 8, 2009
    Location:
    St. Paul, MN
    #1
    I'm learning how to do basic c++ programming and the basic programs that I am starting to write do not work. Xcode stops building the program at a cout line. The error I get is GBD: Stopped at breakpoint 1 (hit count : 1) - 'Line:13'.

    I am sure this is probably a basic flaw in my program but any help that could be offered I will gladly take! Thanks!
     
  2. macrumors G5

    gnasher729

    Joined:
    Nov 25, 2005
    #2
    This looks like you set a breakpoint, started the debugger, and it promptly stopped at the breakpoint. Do you get any error messages if you use Command-B (Build)? Any errors with Command-R (Run)?
     
  3. thread starter macrumors newbie

    Joined:
    Jun 8, 2009
    Location:
    St. Paul, MN
    #3
    No errors?

    I do not get any errors with Build, or with run, but then it does not actually execute the program.
    When I look at the build results, it says build succeeded. I am at a loss.

    Thank you!
     
  4. macrumors G5

    gnasher729

    Joined:
    Nov 25, 2005
    #4
    When you create a new project, XCode automatically creates two build configurations: Debug and Release. In the project window (Command-0, that is Command-Zero) check what is your "Active Build Configuration". It is probably "Debug". In the source code window, check whether you have any breakpoints set: Big blue error to the left of the source code, probably in line 13 because that is where the debugger said it is stopping. That tells the debugger "when this program is started using the debugger, then stop at this line". That's what's happening.

    To enter the debugger window when this happens, press Command-Shift-Y. The debugger can show you which line of the program is executing, what values your variables have, you can step line by line etc. Or press continue and your program runs to the end, or to the next breakpoint.

    To see the output of your program, press Command-Shift-R. This will show the console window, and that is where your output goes.

    To see a window with a list of all breakpoints, press Command-Shift-B. If you don't want to use breakpoints, you can remove breakpoints there.
     
  5. thread starter macrumors newbie

    Joined:
    Jun 8, 2009
    Location:
    St. Paul, MN
    #5
    Thank you for your help! That fixed the problem!!!
     

Share This Page