IPhone development and application debugging tools

Source: Internet
Author: User

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.