【问题标题】:XCode 7 debugger not workingXCode 7 调试器不工作
【发布时间】:2016-06-22 04:12:12
【问题描述】:

我在 XCode 7 中将我的项目转换为 iOS 9。

我注意到我收到了很多这样的警告:

warning: Could not resolve external type c:objc(cs)NSArray
warning: Could not resolve external type c:objc(cs)UIView
warning: Could not resolve external type c:objc(cs)NSString
warning: Could not resolve external type c:objc(cs)NSNumber
warning: Could not resolve external type c:objc(cs)NSObject
warning: Could not resolve external type c:objc(cs)UIWebView
warning: Could not resolve external type c:objc(cs)UIView
warning: Could not resolve external type c:objc(cs)NSObject
warning: Could not resolve external type c:@S@_NSRange
warning: Could not resolve external type c:objc(cs)NSURL
warning: Could not resolve external type c:objc(cs)NSBundle
warning: Could not resolve external type c:objc(cs)NSException

根据我阅读的内容,需要将 GCC_GENERATE_DEBUGGING_SYMBOLS 设置为 NO,这将删除此警告,并且确实有效。但是现在调试器不会在我设置的任何断点处停止。当我将 GCC_GENERATE_DEBUGGING_SYMBOLS 设置为 YES 时,调试器工作正常。

有什么想法吗?

【问题讨论】:

  • 这个问题你解决了吗?

标签: ios objective-c iphone xcode debugging


【解决方案1】:

当您将 Xcode 6 项目更新到 7 时会出现问题。简短的回答是将目标上的调试信息格式更改为“DWARF”,仅用于调试配置。

  • 转到构建设置并搜索调试信息格式
  • 将调试设置从“DWARF with dSYM File”更改为“DWARF”
  • 将 Release 设置保留为“DWARF with dSYM File”

这是安全的,因为您不需要 dSYM 文件进行调试构建

【讨论】:

    【解决方案2】:

    在您的“构建设置”中尝试设置这些参数:

    Enable Clang Module Debugging = NO
    Debug Information Format = DWARF with dSYM
    Precompile Prefix Header = NO
    

    并重建您的项目。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-06-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-01
      • 2012-12-19
      • 2012-06-17
      相关资源
      最近更新 更多