lldb fails to print variable values with "error: reference to 'id' is ambiguous" lldb fails to print variable values with "error: reference to 'id' is ambiguous" ios ios

lldb fails to print variable values with "error: reference to 'id' is ambiguous"


I found one workaround:

Use 'Edit scheme' under the 'Product' menu, select 'Run' in the left bar, the 'Info' tab, and change the Debugger to gdb (this does not apply to xcode 5, which no longer has gdb).

Apparently Apple thought they'd fixed this bug in xcode 4.3.1, but it still happens. I submitted some extra debug information they requested, so I'm hoping it'll be fixed for the next release of xcode. It's still failing in 4.3.2. See https://devforums.apple.com/message/623694 for an update from Apple.

UPDATE

I've tried various cases I was having trouble with, and they all seem to be working fine with lldb in Xcode 4.4.1 - hence I highly recommend upgrading if you're having this problem.


Try with following expression,

p self.view.bounds.size.width

or use,

po self.view

p - Print is only uses to print normal/simple valueswhile,po - Print Object works same as NSLog to print value of an object


Use Edit scheme under the 'Product' menu, select 'Run' in the left bar, the 'Info' tab, and change the Debugger to gdb.

Product>Edit Scheme>Run(Schemes)>Build Configurationit has three options (Some might see only two 1, 2) 1. Debug 2. Release 3. AdHoc

Just cross check if it is set to Debug if not then make it Debug.

This was the mistake I was doing