1.Static Analyzer (static analysis)
Static Analyzer is a very good tool that can help us discover issues that compiler warnings do not prompt.
Static Analysis Benefits:
1, easy to use operation.
2, can be in the coding phase, the development of self-code inspection. Early detection of code pitfalls.
3, directly analyze the source code to find errors in the program, without the need to actually run.
4. Automatic detection of bugs in objective-c programs, memory leaks and other problems.
5. The sooner the memory problem is discovered, the smaller the cost of the solution.
The Static analysis can be used to analyze some of the following:
1 Correct use of retain and release
2 Unused instance variables
3 Uninitialized variables
4 except 0
5 Type not compatible
6 Unreachable code path
7 referencing a null pointer
8 Missing Dealloc
Static Analysis Usage:
1. Open the Xcide "Product" menu and select the Analyzer option (or use the hotkey Command + Shift +b). 2.Static Analyzer captures possible problems in any application and then displays them with a blue warning. 3. We can also set up our app to automatically turn on Static Analyzer when we compile the application, open the project projects file, and set "Run Static Analyzer" to Yes, such as:
Recommended Use scenarios:
1, it is recommended to use in the development of the coding phase, direct analysis of the source code to find errors in the program, without the need to actually run, early detection of hidden code.
2, test in the smoke test can be scanned first, error too much code modification too large cases can be temporarily not involved in testing, so as not to cause rework.
Xcode Development Debugging Tips-.static Analyzer