iOS6になりiPhoneのSafariからconsole出力機能が除外された。 今までは設定→Safari→デベロッパ→デバックコンソールをONにすることで エラーログを確認することができた。 この機能がiOS6ではWebインスペクタに置き換えられてしまった。Webインスペクタとは iPhoneで閲覧しているwebサイトのエラーログを有線接続したMacのSafariで 見ることが出来るというもの。 すなわち、iOS6ではiPhone単独でconsole.logを表示することができなくなってしまったということだ。 対策方法を2つ紹介する。 1.お手軽な方法 windowのonerrorイベントを拾って、エラーの内容をそのままalert表示してしまうという解決方法。 下記の三行を追加するだけで実装できる。 window.onerror = function(error) { alert(er