Xcode 4 learn how to use Instruments

Source: Internet
Author: User

Xcode 4Learn how to useInstrumentsIs the content to be introduced in this article, mainly introduces the useInstrumentsLearn nowXcode 4The content is not much, but it is very beneficial to friends. Let's take a look at the details first.

The following is just a description:Xcode 4Observe and evaluate the current project

Go to Xcode4 and select "Product"> "Profile". The shortcut key is "Command + I ".

To use this method, you must write the normal logic code and do not use NSLog for actual observation.

If you want to Debug with NSLog and use Instruments for detection, you should:

1. Place the code to be detected and Debug In the event-triggered function, instead of in the startup-type loading file, because the debug program is started in Xcode4, in this process, the corresponding program cannot be found for the instrument. {at least when I use the instruments, the program of the current project does not exist in the append program}

2. The started program can be appended to

3. Record the current record after attaching the program. At this time, you can trigger your test code, and instrument can also record the test process. At the same time, you can see the NSLog output in the debug output box to verify your logic.

Compared with the previous one, it records the beginning and end of a specific point, which is not complete.

In practical applications, both can be used.

Summary:Xcode 4Learn how to useInstrumentsI hope this article will help you. MoreXcodeFor more information, see edit recommendations.

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.