What's the difference between “p” and “po” in Xcode's LLDB debugger?

后端 未结 9 1613
无人及你
无人及你 2021-02-04 12:27

Example. I write the following string in my old project and a new, clear one:

UIInterfaceOrientation k = [UIApplication sharedApplication].statusBarOrientation;
         


        
9条回答
  •  没有蜡笔的小新
    2021-02-04 12:46

    po tries to treat what you want to print, as an object. In many cases it is similar to p, but there are cases where the difference emerges.

    The simplest way to see the difference: compare the output of p 0 and po 0.

    (lldb) p 0
      (int) $26 = 0
    (lldb) po 0
      
    

提交回复
热议问题