Xcode 7 beta debugger not showing values of variable at breakpoint for Swift code

后端 未结 8 1765
走了就别回头了
走了就别回头了 2020-12-28 15:30

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 debugg

8条回答
  •  悲哀的现实
    2020-12-28 15:34

    I had the same issue. I solved it from this link here:

    Swift debugger does not show variable values when importing ObjC framework

    First try to move in subfolder all .framework, as Author of this post says:

    I got a message from an Apple developer stating that they've observed this problem, and that it could be fixed by moving the .framework to a subfolder of the project. Apparently the module .. was built in directory error appears only if the .framework is in the same folder as the .xcodeproj aka $(PROJECT_DIR).

    But in my case, the main issue was OpenTok framework. After I add action in the breakpoint

    po self 
    

    Log shows up the message:

    warning: Swift error in module myapp: Swift had fatal errors constructing the ast context for this module: :1:9: note: in file included from :1: #import "/Users/me/Developer/myapp-ios/Pods/OpenTok/OpenTok.framework/Headers/OpenTok.h"

    And finally I added these lines of codes in Podfile:

    post_install do |installer|
      `find Pods -regex 'Pods/OpenTok.*\\.h' -print0 | xargs -0 sed -i '' 's/\\(<\\)OpenTok\\/\\(.*\\)\\(>\\)/\\"\\2\\"/'`
    end
    

    After that finally, pod install.

提交回复
热议问题