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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Canon 60D issue - horizontal banding on dark colours Schtumple Digital Photography 13 Dec 25, 2010 03:57 AM
Boot Camp Issues - Cannot Use my IMAC chico00 Windows, Linux & Others on the Mac 9 Feb 7, 2009 10:18 AM
FONT NIGHTMARE - Safari / Firefox / FontBook new font install issues - PLEASE READ!!! geefx Mac Basics and Help 10 Sep 29, 2008 01:28 PM
Calender Syncing Issues - Please Read briansanderson iPhone Tips, Help and Troubleshooting 4 Nov 2, 2007 09:46 AM
Possible Keychain or Sync Issues - Please Read briansanderson OS X 2 Oct 27, 2007 12:31 PM


All times are GMT -5. The time now is 05:46 AM.

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

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