Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jun 8, 2009, 03:27 PM   #1
sari210
macrumors newbie
 
Join Date: Jun 2009
Location: St. Paul, MN
Xcode Issues - cannot read entire program

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!
sari210 is offline   0 Reply With Quote
Old Jun 8, 2009, 03:43 PM   #2
gnasher729
macrumors G5
 
gnasher729's Avatar
 
Join Date: Nov 2005
Quote:
Originally Posted by sari210 View Post
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!
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)?
gnasher729 is offline   0 Reply With Quote
Old Jun 8, 2009, 03:57 PM   #3
sari210
Thread Starter
macrumors newbie
 
Join Date: Jun 2009
Location: St. Paul, MN
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!
sari210 is offline   0 Reply With Quote
Old Jun 8, 2009, 04:43 PM   #4
gnasher729
macrumors G5
 
gnasher729's Avatar
 
Join Date: Nov 2005
Quote:
Originally Posted by sari210 View Post
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!
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.
gnasher729 is offline   0 Reply With Quote
Old Jun 10, 2009, 01:32 PM   #5
sari210
Thread Starter
macrumors newbie
 
Join Date: Jun 2009
Location: St. Paul, MN
Thank you for your help! That fixed the problem!!!
sari210 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Resolved: [XCode Beginner] Program not Showing in Screen UpsideDown iPhone/iPad Programming 13 Nov 6, 2013 07:50 PM
Sync issues - Have to reload my entire music library each time deuceap610 iOS 7 0 Jul 24, 2013 07:47 AM
NTFS program to read/write on ML jmfel1926 MacBook Air 3 Aug 26, 2012 06:49 PM
Xcode: How to read a pixel off the screen ericbreiter Mac Programming 2 Aug 25, 2012 07:40 PM
Multiplying array elements by 3. C program on Xcode Mugambo Mac Programming 3 Jul 26, 2012 02:02 AM

Forum Jump

All times are GMT -5. The time now is 04:42 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC