Xcode 4.6.1 debugger local variables not available

I recently upgraded Xcode 4.6 to 4.6.1, and I notice the following abnormal behaviour:

  • Sometimes, Local Variables are not available upon a breakpoint

  • Upon Step Into and Step Over when being suspended over a breakpoint, the editor highlights the incorrect line the code.

  • The LLVM 4.2 Compiler - COde Generation / Optimization level is set to None for Debug. I have tried cleaning the project, the simulator, etc. No luck.

    Any clues?


    The issue was that in my Run Configuration, I had chosen Release instead of Debug. Perhaps for Release, the compiler does some code optimisation, because of which, the compiled code and the source code get out of synch.

    Attached is where I had made a mistake:

    在这里输入图像描述


    It may also happen if you enable options like address Sanitizer in "Scheme > RUN > Diagnostics"

    诊断

    链接地址: http://www.djcxy.com/p/68682.html

    上一篇: Xcode 6奇怪的(空)对象显示在调试器中

    下一篇: Xcode 4.6.1调试器本地变量不可用