"1. Normal breakpoint"
This has nothing to say, all the programmers will, the normal breakpoint is no conditional breakpoint, run to the breakpoint will debug, in a row to create a breakpoint shortcut key is: command+\
The next point is to highlight
"2. Conditional breakpoint"
Normal breakpoints can be added or not, we can also configure the properties of the breakpoint, set conditions, make the breakpoint more intelligent, right click on the breakpoint:
I use a loop as the test code:
The code in the loop is executed one step at a time, and if I want to interrupt the program at the time I is 3, write the conditions as follows:
When you set a condition for i==3, the program breaks when that condition occurs, not every time you arrive at that location. The output of the interrupt is as follows:
You can also set the Ignore parameter, ignoring the first n times of the breakpoint run, will be interrupted n+1.
The debug output is as follows:
Also, you can see how many times a function has been called, set the action parameter as follows, and note that you want to select automatically continue after evaluating actions.
The output results are as follows:
"3. Exception Breakpoint"
Sometimes crash will be inside the Mian function, and this breakpoint may stop at the problematic code. The Create exception breakpoint legend is as follows:
"4. Symbol Breakpoint Symbolic Breakpoint"
The creation of a symbolic breakpoint is also the same as an exception breakpoint. A generic symbolic breakpoint can break execution when you specify a [class name method name].
Configure the symbol breakpoint as follows: You can break execution when you execute the Viewdidload method to the Viewcontroller class.
If your symbol only writes a function name, it will break execution where the function name appears. will be interrupted when running to doanimation.
A Practical breakpoint debugging technique