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.