Xcode iOS development of common commands debugging console

1. p command

p command is short for print commands, using the p command to view the value of the basic data types, but if you use the p command to view the object, then the object will only return pointer address.

In addition to the back of the p command can take variables, constants, can take expressions.

2. po command

po command can be understood as a print object. P command similar functions, it is also possible to print constants, variables, objects are printed expression returns and so on.

Of course, these printing capabilities, in addition to using the command, we can also use the left area, right-click variables -> print Description of "xxx"

3.expr command

expr is a shorthand expression, use the expr command can when debugging, dynamic execution of an assignment expression, and print out the results. We can dynamically modify the variable value at the time of commissioning, which is in debug want to make an exception application execution path (such as performing an else case) is useful.

4.call command

The above is dynamically modify the values ​​of variables, Xcode also supports dynamic function calls. Execute the command at the console, it can be made without modifying the code, without recompiling, the view on the modified interface.

5.bt command

bt command to print out the thread stack information, the information than Debug Navigator on the left side to see even some of the details.

bt all command is to print a stack information for all threads.

6.image command

image list

Command (useful when the module back to the symbolic break point), one can see the position of the code corresponding to the address list of all current module App.

In addition to image list still image add, image lookup commands, you can view on their own.

When confronted crash, view the thread stack, can only see the address of the stack frame, using the image lookup -address address can easily navigate to an address corresponding to this line of code.

 

Guess you like

Origin www.cnblogs.com/hecanlin/p/11041639.html