iOS Debugging Tips

Source: Internet
Author: User

Data: http://www.cnblogs.com/daiweilai/p/4421340.html#undefined First, Breakpoint basic operation: Add, remove, monitor (watch) a variable.Normal BreakpointEdit Breakpoint1, ConditionThe conditional expression can be entered here, and the breakpoint will take effect when the condition is met.2, IngoreHere you can set the number of ignored breakpoints.3. ActionThere are 6 types of action that are commonly usedLog MessageAndDebugger Command
    • Log Message:%b will print the name of the breakpoint,%h will print the breakpoint's call number, @@ 中间 be entered in the middle of an expression
    • Debugger Command:po (Print object information), BT (print function stack), expression (expressions).
    • After checking automatically continue after evaluating actions, the program will continue to run after the breakpoint has been generated. You can enter debugging information as far as the program is not paused. (?)
Global Breakpoint(Exception breakpoint) locates the exec_bad_access inside main: the problem.breakpoint Debugging for OpenGL es(OpenGL ES Error Breakpoint)Symbol Breakpoint(Symbolic Breakpoint) A breakpoint is generated when the program runs to a specific symbol. Adding breakpoints in this way does not need to be added to the source file, nor does it need to know where the breakpoint is set in the first line of the file. Two more attribute symbol and module than normal breakpoint. 1. Method Name: All class methods that have this method name will take effect. For example initWithFrame:. 2. Methods for a particular class: The OC class and the C + + class are applicable, for example, [UIView initwithframe:] or Shap::d Raw (). 3. Function name. For example, ordinary C functions.Test Failure BreakpointSecond, print
#define NSLog (format, ...) do {\"<%s:%d>%s\n""-------\ n  " while (0)
Third, console (LLDB) console command information: http://objccn.io/issue-19-2/commonly used debugging commands help---helping print--printing expression-changing the values within the program po//PAndeTo replacePrintAndexpressionLLDB cannot determine the type involved (translator Note: The type returned)//P (char) [[$array objectatindex: $a] characteratindex:0]//p/d (char) [[$array Objectatindex: $a] characteratindex:0]

iOS Debugging Tips

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.