[英]Cannot debug in Xcode: Debug info from this module will be unavailable in the debugger
Debugging in Xcode is not possible after adding Firebase. 添加Firebase后无法在Xcode中进行调试。
You cannot execute commands with expr and there is no variable information viewable. 您无法使用expr执行命令,也无法查看可变信息。
Firebase was integrated without Cocoapods using these directions: https://firebase.google.com/docs/ios/setup#frameworks 使用以下说明在没有Cocoapods的情况下整合了Firebase: https ://firebase.google.com/docs/ios/setup#frameworks
Here's what Xcode displays after trying to execute a command with expr : 以下是在尝试使用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'
We're using Swift 3. 我们正在使用Swift 3。
It's a bug of Xcode. 这是Xcode的一个bug。 i am facing the same problem.
我面临同样的问题。 After some researches i found that this happens because of bad code, especially when you use closures.
经过一些研究后我发现这是因为代码不好,特别是当你使用闭包时。 It is being reported as xcode bug, but there are some ways to fix it.
它被报告为xcode bug,但有一些方法可以解决它。 Use print("") for debugging.
使用print(“”)进行调试。
The problem was not updating User Header Search Paths with the directory containing module.modulemap . 问题是没有使用包含module.modulemap的目录更新用户头搜索路径 。
Here are the instructions, accidentally overlooked, for manual installation: 以下是手动安装时意外忽略的说明:
If you're using Swift, or you want to use modules, drag module.modulemap into your project and update your User Header Search Paths to contain the directory that contains your module map.
如果您正在使用Swift,或者您想使用模块,请将module.modulemap拖到项目中并更新您的用户标题搜索路径以包含包含模块映射的目录。
The other hiccup was recognizing the correct directory path since we used groups to organize files, not folders. 另一个打嗝是识别正确的目录路径,因为我们使用组来组织文件,而不是文件夹。
May someone else benefit from our stupidity! 愿别人从我们的愚蠢中受益! :)
:)
You have to add your modules like Firebase to your test-scheme in your podfile 您必须将您的模块(如Firebase)添加到podfile中的测试方案中
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
(I'm not 100% sure if this works) (我不是百分百确定这是否有效)
I had the same problem when I was using XCode 9. I spend 2 hours searching for the solution then someone suggested me, I should run my code on XCode 10 (I'm still using XCode beta). 我在使用XCode 9时遇到了同样的问题。我花了2个小时搜索解决方案然后有人建议我,我应该在XCode 10上运行我的代码(我还在使用XCode beta)。 It worked😃.
它起作用了。
Hope that helps!!. 希望有所帮助!!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.