PhantomJS で itunes の url に接続しようとするとエラーになり、デバッグしたいので方法を調べた話。 まず、SSL の通信なので、別のプロセスから tcpdump などで通信をキャプチャすることは難しい。 方法の一つとして、--debug=yes というコマンドラインオプションを渡すと、詳細なログをだしてくれるようだ。(ドキュメント には載っていないオプションだった) $ phantomjs --debug=yes crawl.js 2014-11-01T15:53:28 [DEBUG] CookieJar - Created but will not store cookies (use option '--cookies-file=' to enable persisten cookie storage) 2014-11-01T15:53:28 [DEBUG] Pha
![PhantomJS でネットワークのデバッグと SSL handshake failed](https://cdn-ak-scissors.b.st-hatena.com/image/square/87bb59df23f4ab97a94294d3a89d9daa76699003/height=288;version=1;width=512/https%3A%2F%2Fplease-sleep.cou929.nu%2Fimages%2Fkosei-pic.png)