Xcode 11 调试器在断点处崩溃,找不到 Foundation.h
Posted
技术标签:
【中文标题】Xcode 11 调试器在断点处崩溃,找不到 Foundation.h【英文标题】:Xcode 11 debugger crashes on breakpoint, can't find Foundation.h 【发布时间】:2019-10-23 14:58:34 【问题描述】:我的 macOS 应用程序编译并运行良好,但自从切换到 Xcode 11 后,我无法再从断点进行调试。调试器总是会因为一堆这样的消息而崩溃:
warning: Swift error in scratch context: /foobar/Foo-Bridging-Header.h:14:9: note: in file included from /foobar/Foo-Bridging-Header.h:14:
#import "TPPreciseTimer.h"
^
error: /foobar/Timer/TPPreciseTimer.h:9:9: error: 'Foundation/Foundation.h' file not found
#import <Foundation/Foundation.h>
^
/foobar/Timer/TPPreciseTimer.h:9:9: note: did not find header 'Foundation.h' in framework 'Foundation' (loaded from '/System/Library/Frameworks')
#import <Foundation/Foundation.h>
^
error: failed to import bridging header '/foobar/Foo-Bridging-Header.h'
.
Shared Swift state for Foo has developed fatal errors and is being discarded.
REPL definitions and persistent names/types will be lost.
Message from debugger: The LLDB RPC server has crashed. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log.
有人知道这样的解决方法吗?
我仍在使用 Xcode 10.3 的同事使用相同的代码库没有遇到此问题。
【问题讨论】:
它不再发生了。也许苹果解决了这个问题? 【参考方案1】:这里也一样。删除 /Users/user/Library/Developer/Xcode/DerivedData
目录有所帮助。
【讨论】:
以上是关于Xcode 11 调试器在断点处崩溃,找不到 Foundation.h的主要内容,如果未能解决你的问题,请参考以下文章
Xcode 6.1 和 6.1.1 在调试器断点处崩溃(模拟器)
在我的华为手机上调试时,Android Studio 调试器在断点处崩溃/停止
Qt 调试崩溃/退出 python 并最终无法正确调试(例如,不在断点处停止)