Xcode 7 beta debugger not showing values of variab

2020-02-20 07:13发布

I have tried the answers from question here but none of them helped :(

I have installed Xcode 7 beta 5 and the debugger will not show values of variables when debugging swift code. It works fine in Obj-C code.

I have tried changing the Compiler Optimisation level to None and it had not effect.

enter image description here

8条回答
别忘想泡老子
2楼-- · 2020-02-20 08:15

This may be due to a problem in the bridging file between Swift and Objective-C, e.g the file {projectName}-Bridging-Header.h . To make sure about that:

1- add a breakpoint at the place you want to debug.

2- After the breakpoint is reached, write the lldb command po on any object in the xCode debugging output window. for example :

po self.view

If there is a problem you should see it's log and hopefully you can go and fix it

查看更多
不美不萌又怎样
3楼-- · 2020-02-20 08:17

Removing Fabric/Crashlytics did it for me. I can say for sure not ALL ObjC imports cause this problem. I'm still using some others in my Swift project but for some reason Crashlytics causes some issues in the latest beta. I got a compiler error early on too and I had to turn off bitcode for the project to even compile.

查看更多
登录 后发表回答