IPhone DevelopmentApplicationDebugging toolsLearning is the content to be introduced in this article. If you have never encountered any errors when writing a program, you can only say that you are either a genius or your program is too simple.Debugging tools.
Debugging
Xcode's GDB debugging tool is indeed very powerful, simple, clear, and easy to find out where your error is.
The following describes how to use GDB:
1) breakpoint
To stop a program midway through, you must first set a breakpoint. In Xcode, you can easily set a breakpoint by clicking in the left column of the text editing box, the breakpoint icon appears.
2) run the program
After the breakpoint is set, we start to run the program and the program will stop at the first breakpoint you set.
3) Check the value of the variable in the code.
The main purpose of debugging is to check whether the value of the variable matches our expectation. Let's first look at the meanings of these icons:
First: continue
After you click it, the program runs to know that it meets the next breakpoint, and then ends or crashes.
Second: Skip button
Click it to execute a line of code, and the control of the program will be exchanged with you.
Third: Jump in
If the program contains the source code of the function or method with the current cursor, Xcode will jump into that method and display its code, set the arrow "you are here" to the starting position of the Code.
Fourth: Jump out
Clicking it will terminate the currently running function and the program will stop in the next line of code that calls the function, and the control will return to you.
Summary:IPhone DevelopmentApplicationDebugging toolsI hope this article will be helpful to you!