Swift debugger does not show variable values when importing ObjC framework

后端 未结 6 1680
灰色年华
灰色年华 2020-12-02 20:11

When I create a new OS X \"Game\" project with Sprite Kit, and set a breakpoint anywhere I can see the variable values just fine:

6条回答
  •  误落风尘
    2020-12-02 21:00

    In my case this was happening because of redundant import statements in my project.

    My project mixes swift and objc files, so I have import statements in the bridging_header.h file.

    In my bridging_header.h I had #import blah.h

    In one of the swift files, I was importing a redundant header from a framework @import blah // From blah.framework

    I removed the redundant import from the swift file, that seems to have fixed it.

提交回复
热议问题