Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode, can't view variables when stepping through a framework, which is built and linked within the same workspace

So I have this shared framework

To bring it into my main app target, I put it in the "Embedded Binaries", with a direct reference to the Framework product "build/Debug"

This appears to build the framework every time I run my main app.

I can set breakpoints in the framework code, but my variables are all empty, and lldb gives me error: use of unresolved identifier

enter image description here

This leads me to believe I just linked the framework incorrectly, I need to modify something in the build settings so that lldb can correctly locate the addresses of the variables? (Normally there would still be virtual addresses in the variable view right?) It's just weird to me that I can still step through the lines of code within the framework.

Anybody see this before?

like image 987
A O Avatar asked Dec 20 '17 23:12

A O


2 Answers

Happened to me as well. This is due to the Build configuration mode - Release. If you would like to see variable values you have to be in Debug mode.

Click on your project target -> Product menu -> Scheme -> Edit Scheme -> Run -> Info tab -> Build configuration -> Change mode to Debug.

enter image description here

enter image description here

like image 171
Shamsudheen TK Avatar answered Sep 30 '22 16:09

Shamsudheen TK


Shamsudheen's answer is the first thing to check.

If that doesn't help, you can try typing frame variable components in the debugger instead of po components, and see if that helps.

like image 25
Jacek Lampart Avatar answered Sep 30 '22 17:09

Jacek Lampart