I've been silently dealing with this for months now and finally I feel the need to ask here. 'po' in lldb often results in the following output:
(lldb) error: :3:1: error: use of unresolved identifier 'inView' inView ^~~~~~
I'm writing up a custom animation view controller transition. I'm paused in the animateTransition(using transitionContext:)
method. inView
is a local variable defined at the start of the method. I'm using it on the next line. I want to query its value. It shows up in the 'variables view' part of the debugger (however just the name and no details).
So I see no reason why this shouldn't print out.
Now, before people talk about optimization, this is a fresh single view application running a default scheme. The default optimization settings for the Swift compiler have no optimization for the debug profile. This is indeed how my project is set up.
So what is the problem??
frame variable
orframe variable inView
?p
evaluates an arbitrary expression, which is orders of magnitude more complicated than looking up a variable. – zneakframe variable
was appearing to work.po
works sometimes but often not. it tends to work towards the beginning of the method (7 lines in) but not towards the middle (10-15 lines in). its totally unpredictable. – Alex Bollbachex -l objc -O -- inView
The-l
flag lets you specify the language of the expression to evaluate: you can write an ObjC expression even if you're stopped in a Swift context. – jscs