Xcode debugger sometimes doesn't display variable values?

后端 未结 19 2096
醉话见心
醉话见心 2020-12-14 13:54

This happens to me pretty often. For example, right now I have the debugger stopped at a breakpoint in a method . . . and it isn\'t displaying any variable values at all.

19条回答
  •  有刺的猬
    2020-12-14 14:40

    There is a situation I have seen where Xcode can't cope with return value optimisation (RVO) -- if the compiler decides to apply RVO to a variable then it may not appear in the variables list. You can disable this in g++ and clang with the compiler flag -fno-elide-constructors

    See also Understanding eliding rules with regard to c++11

提交回复
热议问题