iOS   发布时间:2022-05-04  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了ios – 在Swift 3迁移后无法在调试器中查看变量值大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

我们已将iOS项目迁移到 Swift 3和Xcode 8.从那时起,调试器无法显示任何变量值.如果我尝试打印变量: p someVar 我收到此错误消息. scheR_495_11845@aManager.h是一个桥接头. (实际的项目名称已被下面的yyy替换): warning: Swift error in module yyy. Debug info from this module will be unavai
我们已将iOS项目迁移到 Swift 3和Xcode 8.从那时起,调试器无法显示任何变量值.如果我尝试打印变量:

p someVar

我收到此错误消息. scheR_495_11845@aManager.h是一个桥接头. (实际的项目名称已被下面的yyy替换):

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

error: in auto-import:
Failed to get module 'yyy' from AST context:
/Users/xxx/Documents/yyy/yyy/Common/Model/scheR_495_11845@aManager.h:10:9: note: while building module 'sqliteMacOSX' imported from /Users/xxx/Documents/yyy/yyy/Common/Model/scheR_495_11845@aManager.h:10:
#import <sqlite3.h>
        ^

/Applications/Xcode.app/Contents/Developer/Platforms/iPhonesimulator.platform/Developer/SDKs/iPhonesimulator10.0.sdk/usr/include/sqlite3.h:35:10: note: while building module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhonesimulator.platform/Developer/SDKs/iPhonesimulator10.0.sdk/usr/include/sqlite3.h:35:
#include <stdarg.h>     /* Needed for the deFinition of va_list */
         ^

<module-includes>:33:9: note: in file included from <module-includes>:33:
#import "util.h"
        ^

error: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/util.h:107:10: error: 'utmp.h' file not found with <angled> include; use "quotes" instead
#include <utmp.h>
         ^

/Users/xxx/Documents/yyy/yyy/Common/Model/scheR_495_11845@aManager.h:10:9: note: while building module 'sqliteMacOSX' imported from /Users/xxx/Documents/yyy/yyy/Common/Model/scheR_495_11845@aManager.h:10:
#import <sqlite3.h>
        ^

<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sqlite3.h"
        ^

error: /Applications/Xcode.app/Contents/Developer/Platforms/iPhonesimulator.platform/Developer/SDKs/iPhonesimulator10.0.sdk/usr/include/sqlite3.h:35:10: error: Could not build module 'Darwin'
#include <stdarg.h>     /* Needed for the deFinition of va_list */
         ^

/Users/xxx/Documents/yyy/yyy/Common/Model/Bridging-Header.h:12:9: note: in file included from /Users/xxx/Documents/yyy/yyy/Common/Model/Bridging-Header.h:12:
#import "scheR_495_11845@aManager.h"
        ^

error: /Users/xxx/Documents/yyy/yyy/Common/Model/scheR_495_11845@aManager.h:10:9: error: Could not build module 'sqliteMacOSX'
#import <sqlite3.h>
        ^

error: Failed to import bridging header '/Users/xxx/Documents/yyy/yyy/Common/Model/Bridging-Header.h'

核心错误归结为:

error: 'utmp.h' file not found

我在其他地方读过,桥接头中的问题可以阻止调试器显示变量值.但我不确定如何解决这个问题.

解决方法

TLDR;清理你的桥接头,确保你只有你需要的.

我遇到了同样的问题,但是在AST上下文中无法获得模块’yyy’之后没有输出.我从桥接标题删除了所有内容,然后逐个添加项目以确保我需要一切.

我发现添加#import< UIKit / UIKit.h>在顶部是必要的(但最初缺少)并找到一些我不需要的,因为我改变了我的项目结构,忘了删除一些包含.毕竟,它开始工作.希望这会有所帮助.

大佬总结

以上是大佬教程为你收集整理的ios – 在Swift 3迁移后无法在调试器中查看变量值全部内容,希望文章能够帮你解决ios – 在Swift 3迁移后无法在调试器中查看变量值所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。