Xcode 4.3 debugging tips

Discussion in 'iOS Programming' started by AlbuquerqueApac, May 8, 2012.

  1. AlbuquerqueApac macrumors member

    Joined:
    Jan 13, 2012
    #1
    Hello all!

    I have managed to get an App running in my iOS simulator.

    However, I am getting certain exceptions for certain functions and I would like to track them down in the source code. I am getting memory segments in the debugging information, which isn't overly helpful. I have seen some info online about introducing breakpoints as (unhandled) exceptions are thrown.

    Any techniques that will aid in tracking down bugs?
     
  2. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #2
    Adding an exception breakpoint, so you see where it goes wrong.. second is to turn on NSZombieEnabled so you can see where the zombies occur (the breakpoint works better)
     
  3. AlbuquerqueApac thread starter macrumors member

    Joined:
    Jan 13, 2012
    #3
    Do you add thes eonce the exception has occured? or before you run your program.
     
  4. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #4
    You have to add it once, go to the breakpoint tab in Xcode, press the + at the bottom, click add Excpetion breakpoint.
    Press -> Exception: All
    Break: On Throw
    ACtually click on "Click to add an action", it will say debugger command, but do "log message" there, and in the debugger command press "@exp@"
    If you press done now and run, it should run a breakpoint at where exactly it should go wrong :)
     
  5. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
  6. AlbuquerqueApac thread starter macrumors member

    Joined:
    Jan 13, 2012

Share This Page