Unable to use po command in console (debug area)

Deadly 提交于 2019-12-04 14:42:08

lldb has changed in Xcode 10.2. Apple recommends use of 'p' or more recently 'v' to view the values of variables.

from the Xcode 10.2 Release Notes

The LLDB debugger has a new command alias, v, for the “frame variable” command to print variables in the current stack frame. Because it bypasses the expression evaluator, v can be a lot faster and should be preferred over p or po. (40066460)

There is also good information on this in the LLDB Tutorial in the section named Examining Stack Frame State.

The frame variable command will also perform "object printing" operations on variables (currently we only support ObjC printing, using the object's "description" method. Turn this on by passing the -o flag to frame variable:

(lldb) frame variable -o self 
(SKTGraphicView *) self = 0x0000000100208b40 
<SKTGraphicView: 0x100208b40>

Looks like you are using swift. You can get this sort of error when you upgrade your Xcode but don't completely rebuild all your swift dependencies with the new toolset. If after you've cleaned all your dependencies (including any Pods or Carthage modules, etc) and rebuilt them all locally, you still get this error, if this is a project you can make available please file a bug either with http://bugs.swift.org or http://bugreporter.apple.com and we'll take a look.

Use debugprint command in place of po command.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!