tags:

views:

51

answers:

1

is there any way to see the step by step debugging of the code in objective C, like we use to do in Turbo C with the keyboard key of 'F7 / F8'. to see the line by line execution?

+2  A: 

Sure. If you're using XCode (ala 99.99999% of Objective C users), just set a breakpoint, and when hit, control GDB either with the normal stepwise commands, or with the little interface toolbar that appears at the top of the source window.

For keyboard shortcuts, this guide has as section called "Run".

Adam Wright
hi, thanks for replying, but breakpoint will shows only the behavior of the particular piece of code in the porject. But what if i want to understand the step-by-step code i.e which funtion is calling what method or class and so on from start till end, is there possibilty for that?
maddy
Just put a breakpoint on main, and step through
Adam Wright
When you add a break point, there is part of the debugging window that shows a trace of all the class/methods that were called to get to where the breakpoint was. (I find this very helpful, it shows what happened up until that point)
Jacob
Jacob - almost, but not quite. You see the call stack, that shows you the nesting of functions that were called to get to the current location. You don't see a trace of all previous calls that were executed on the path to the current state.
Adam Wright