PDA

View Full Version : Step by step execution in xcode?




hajira
Aug 21, 2012, 04:39 AM
I m a newbie o iPhone development and I want to know "how to do step by step execution in Xcode 4.1 so that I can check the values of variables at each step"? I kept a breakpoint at the first statement.Nowwhen I run the application ctrl is not transferred to the breakpoint ?How to move to next statement and check its variable value after the breakpoint statement?



Reason077
Aug 21, 2012, 05:44 AM
I kept a breakpoint at the first statement.Nowwhen I run the application ctrl is not transferred to the breakpoint ?How to move to next statement and check its variable value after the breakpoint statement?

This should work.

Make sure your build configuration is set to "Debug" in "Manage Schemes" (should be the default for new projects).

Make sure your breakpoint is set on a line of code that is actually executed. application:didFinishLaunchingWithOptions in your AppDelegate might be a good place to start.

Once the breakpoint is hit, you'll see the debugger icons for step, continue, etc. Values of local variables are shown in the tree in the debugger window, or you can mouse over them in the source code.

ArtOfWarfare
Aug 21, 2012, 05:47 AM
The breakpoint should be blue (enabled) not gray or transparent (disabled.)