Why sometimes 'self' isn't available while debugging with lldb?

前端 未结 4 1820
隐瞒了意图╮
隐瞒了意图╮ 2021-01-04 05:44

A lot of time (when it\'s not every time) I got the following error when I try to print objects on lldb. Is there some build/debug configuration to change or is this an erro

4条回答
  •  攒了一身酷
    2021-01-04 06:49

    I usually get this error when I have compiler optimization turned on. The compiler will generate code which does not necessarily follow your code logic flow.

    Go to your project in the navigator -> Target -> Build settings -> Search for optimization level -> expand optimization level -> select the debug line -> change to none in both columns of your project and target.

    Hope this helps.

提交回复
热议问题