2016-10-31 7 views
6

iOSプロジェクトをSwift 3およびXcode 8に移行しました。それ以来、デバッガは変数の値を表示できません。変数を印刷しようとすると:Swift 3の移行後にデバッガで変数値を表示できません

p someVar 

このエラーメッセージが表示されます。 SchemaManager.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/SchemaManager.h:10:9: note: while building module 'SQLiteMacOSX' imported from /Users/xxx/Documents/yyy/yyy/Common/Model/SchemaManager.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/SchemaManager.h:10:9: note: while building module 'SQLiteMacOSX' imported from /Users/xxx/Documents/yyy/yyy/Common/Model/SchemaManager.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 "SchemaManager.h" 
     ^

error: /Users/xxx/Documents/yyy/yyy/Common/Model/SchemaManager.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 

Iヘッダをブリッジに問題が示すからデバッガを停止することができることを他の場所で読みました変数値。しかし、私はこの特定の問題をどのように修正するかについてはわかりません。

答えて

1

TLDR;ブリッジヘッダーをきれいにして、必要なものだけを確保してください。

私は同じ問題を抱えていましたが、failed to get module 'yyy' from AST contextの後に出力はありませんでした。ブリッジヘッダーからすべてを削除し、すべてを必要としていることを確認するために1つずつ項目を追加しました。

先頭に#import <UIKit/UIKit.h>を追加する必要があることがわかりましたが、プロジェクトの構造を変更してインクルードの一部を削除するのを忘れてしまったので、私が必要としなかったものがいくつか見つかりました。結局のところ、それは働き始めた。うまくいけば、これは役に立ちます。

+0

ブリッジヘッダーから2つのヘッダーファイルをインポートしました。私は両方が必要です。いずれかをコメントすると、コンパイルの問題が発生します。 – RajV

+0

私はこのアイデアで早期の成功を見ましたが、問題は断続的に戻ってきます。私はその問題がどこか他の場所にあると思って、ポッドが変わってから別のものに変わるまでそれがなくなるように変わった。これはイライラしています。 – Troy

+0

別の '' pod update''の後に、Objective CからSwift 3に変換されたポッドがいくつかあるので、適切なimport文をそれらのポッドを使用するさまざまな高速ファイルに追加してからポッドファイルから削除すると、デバッガが戻ってきた! – Troy

関連する問題