# # introduction

Debug tracking is a must in development, but many developers have done a lot of projects, but do not know what debugging commands in development can help us to locate problems faster and better. This article focuses on how to use LLDB for debugging in development. I’ll start with some basics, mainly to help beginners learn how to debug. For some more advanced operations, it does not matter, but if you can master it, it will be easier and faster to find problems. Basic debugging operations


  • 1 click the first button will fold up this column, also can not see.
  • 2 Second button: if it is blue, the breakpoint is valid. If you click on it and it turns gray, then all breakpoints don’t work.
  • 3 the third button: “Continue” means to resume the program from the breakpoint and continue running. After clicking this button, the application will resume normal operation.
  • 4 The fourth button is a single step, each time we press this button, the program will start from our breakpoint, one step down.
  • If the breakpoint is on a function call, the breakpoint will continue to go inside the function for debugging.
  • The sixth button is: Jump means that if we are currently in a function, it will jump out of the current function and return to the call of the function. From the official description, p, print, call are the same, but Po is not quite the same, the input is the same but the output is different. The Po output is the content of the concrete object. LLDB declares variables

    We declare the $STR variable with e, and then we can use it. Do we see all the variables printed from the p command starting with $? We also need to declare and use the $sign, just like PHP! When debugging, when you want to temporarily evaluate a value for comparison, you can do it this way, no longer have to add a declaration implementation to the source code and then add a print sentence, isn’t it much more convenient? When we want to know the structure of a view, we can call recursiveDescription and print it out.