LLDB: Couldn't IRGen expression

前端 未结 8 1181
清歌不尽
清歌不尽 2021-02-01 01:16

When I\'m running a unit test and want to debug something, I set a breakpoint and type for instance \"po myVariable\". The response I get from LLDB is:

error: Co         


        
8条回答
  •  渐次进展
    2021-02-01 01:36

    edit:

    Since this answer gets some attention, please note that it describes just a quick fix.
    If you encounter the problem frequently, check the other answers for a more permanent solution.
    For me, cleaning the build folder did the trick.
    Edit 2: Cleaning doesn't help in some cases, carthage update --platform iOS --no-use-binaries always does for me.

    original answer:

    I have a quick and dirty solution that makes this work.

    • select the first accessible frame in your debug navigator, usually main

    • type something in the debugger, for example po self

    • select the original frame in the debug navigator and execute your command, it should work now

    I don't know why it works, but it does for me. I just found out by chance.
    I'd be interested to hear an explanation from somebody with more insights (I am using Carthage in my project).

提交回复
热议问题