#author("2016-12-05T14:56:02+09:00","default:wikiwriter","wikiwriter")
[[Xcode]]

&tag(Xcode/デバッグ);
*目次 [#fad1cb55]
#contents
*関連ページ [#hc2cf44f]
*参考情報 [#o9668e3e]

*デバッグ方法 [#nb919738]

**デバッグマクロの使用 [#t347c23a]
-以下のようなマクロを使用したい。
-Build Settings > Swift Compiler - Custom FLags > Other Swift FlagsのDebug設定に"-D DEBUG"を追加する。
#pre{{
#if DEBUG
    print("debug")
#elseif DEBUG2
    print("debug2")
#else
    print("else")
#endif
}}

**シミュレーターでリリースビルドを実行 [#icd90a4e]
-Edit Schemeで、RunのBuild ConfigurationをReleaseに切り替える。
-都度都度切り替えるしかない模様。

*その他一般 [#ie178890]

**EXC_BAD_ACCESSの調査方法 [#od680507]
-[[Switching Views throws a "EXC_BAD_ACCESS". « cocos2d for iPhone:http://www.cocos2d-iphone.org/forum/topic/8609]]

**Releaseビルドだけで落ちる? [#ce057d3d]
-[[iPhone release build is crashing - Stack Overflow:http://stackoverflow.com/questions/2545512/iphone-release-build-is-crashing]]
-[[Q: Xcodeビルドして実機デバッギはじめると "The program being debugged is not being run." とかでて即終了してしまうよ! - laiso - iPhoneアプリ開発グループ:http://iphone-dev.g.hatena.ne.jp/laiso/20100305/1267789308]]
-[[iPhone Debugging: How to resolve 'failed to get the task for process'? - Stack Overflow:http://stackoverflow.com/questions/1488600/iphone-debugging-how-to-resolve-failed-to-get-the-task-for-process]]

**実機で起動できない [#tb5dea7d]
[[iPhoneでアプリケーションインストール中にエラーとなった場合の対処: iPhoneアプリ開発備忘録:http://iphone-app-developer.seesaa.net/article/158115540.html]]のような現象。
-実機デバッグしようと思うとつぎのようなメッセージが表示され起動できない。
 Couldn't register com.yourcompany.FooApp with the bootstrap server. Error: unknown error code.
-iOS4でマルチタスクの裏で同じタスクが動いていたのでそれを止めてから再度実行すればOKだった。




トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS