Inserting Breakpoints

  • To insert a breakpoint in XCode, simply click in the area to the left of where you want the program to pause.
  • Shown in this screenshot are two breakpoints to the left.
  • After pressing the run button, you can see all of your local variables in a window like this (usually at the bottom of the screen):
  • You will find, in the upper left section of the screen, five buttons that will help you navigate through your program. The middle button -with a curved arrow over a dash- will let you move step-by-step through your program.
  • You can see the values of your local variables change ( name : Roger Clements) as you step through the program.
  • With pointers, vectors, or other data structures, you can click on the arrow next to the variable and the value(s) of the variable will be shown (… with a little bit of searching).
  • If you are finished debugging, press the button to the left of the “step over” button. This will run all processes to either the end of the code or the next breakpoint.
  • Congratulations! You are now a pro. debugger!
cs-142/debugging-in-xcode.txt · Last modified: 2015/01/07 16:12 by ryancha
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0