In other words, writing a code is a process of writing a bug and then debugging a bug.
1, Xcode The simplest is the NSLog
NSLog (@ "str---%@\n\n", str);//Too many NSLog, Apple may not pass the audit.
2. Breakpoints
When you click in the number area, a blue breakpoint will appear. Coordination Diagram II can be debugged.
Figure one: Figure II:
But an n-cycle, it is impossible to press the button for a moment, which is you need to right-click on the blue Breakpoint, three; Figure four Select the condition,
Control to stop in that cycle.
Might
Figure IV:
About the Blue breakpoint:
Clicking the Blue Breakpoint again will unregister the breakpoint and drop the area to remove the breakpoint.
Clicking on the five red box will show all breakpoints, and clicking on Figure six will comment on all breakpoints.
Figure V: Figure VI:
Also, dragging a breakpoint on the diagram v deletes the breakpoint.
ios-xcode-debug-Commissioning