簡體   English   中英

無法在Xcode中調試:來自此模塊的調試信息在調試器中不可用

[英]Cannot debug in Xcode: Debug info from this module will be unavailable in the debugger

添加Firebase后無法在Xcode中進行調試。

您無法使用expr執行命令,也無法查看可變信息。

使用以下說明在沒有Cocoapods的情況下整合了Firebase: https ://firebase.google.com/docs/ios/setup#frameworks

以下是在嘗試使用expr執行命令后Xcode顯示的內容:

warning: Swift error in module Test.
Debug info from this module will be unavailable in the debugger.

error: in auto-import:
failed to get module 'Test' from AST context:
error: missing required module 'Firebase'

我們正在使用Swift 3。

這是Xcode的一個bug。 我面臨同樣的問題。 經過一些研究后我發現這是因為代碼不好,特別是當你使用閉包時。 它被報告為xcode bug,但有一些方法可以解決它。 使用print(“”)進行調試。

問題是沒有使用包含module.modulemap的目錄更新用戶頭搜索路徑

以下是手動安裝時意外忽略的說明:

如果您正在使用Swift,或者您想使用模塊,請將module.modulemap拖到項目中並更新您的用戶標題搜索路徑以包含包含模塊映射的目錄。

另一個打嗝是識別正確的目錄路徑,因為我們使用組來組織文件,而不是文件夾。

願別人從我們的愚蠢中受益! :)

您必須將您的模塊(如Firebase)添加到podfile中的測試方案中

的CocoaPods

source 'https://github.com/CocoaPods/Specs.git'
# Uncomment the next line to define a global platform for your project
 platform :ios, '10.0'

target 'yourApp' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for yourApp
  pod 'Alamofire', '4.4.0'
  pod 'Firebase', '4.3.0'

  target 'yourAppTests' do
    inherit! :search_paths
    # Pods for testing
    pod 'Firebase', '4.3.0'
  end

end

Manualy補充道

(我不是百分百確定這是否有效)

  1. 點擊Xcode中的Projekt(項目中的第一個列表點)
  2. 選擇目標你的測試目標(yourAppTests)
  3. 在“Build Settings”中搜索“其他鏈接”
  4. 添加到“其他鏈接標志”
    1. -ObjC
    2. -framework
    3. “GoogleToolboxForMac”
    4. -framework
    5. “nanopb”

我在使用XCode 9時遇到了同樣的問題。我花了2個小時搜索解決方案然后有人建議我,我應該在XCode 10上運行我的代碼(我還在使用XCode beta)。 它起作用了。

希望有所幫助!!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM