ここの指示に従いました:
https://github.com/ariya/phantomjs/wiki/トラブルシューティング
そして、私はここでSOを見てきました:
しかし、私の人生では、PhantomJS を使用したリモート デバッグを機能させることはできません。これが私が試したことです:
[ubuntu:phantom]$ phantomjs --version
1.9.1
[ubuntu:phantom]$ phantomjs --remote-debugger-port=9001 test.js &
[1] 14037
[ubuntu:phantom]$ sudo netstat -pntl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:9418 0.0.0.0:* LISTEN 1075/git-daemon
tcp 0 0 127.0.0.1:5038 0.0.0.0:* LISTEN 1466/asterisk
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1629/apache2
tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 1466/asterisk
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 1089/dnsmasq
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 968/cupsd
tcp 0 0 127.0.0.1:5984 0.0.0.0:* LISTEN 1363/beam.smp
tcp6 0 0 :::9418 :::* LISTEN 1075/git-daemon
tcp6 0 0 ::1:631 :::* LISTEN 968/cupsd
[ubuntu:phantom]$ google-chrome localhost:9001
Created new window in existing browser session.
[ubuntu:phantom]$
[ubuntu:phantom]$ nc localhost 9001
上記は (当然のことながら) で Chrome を開きますOops! Google Chrome could not connect to localhost:9001
。9001 で開いているポートが表示されませんか? __run()
私が収集できることから、Chrome は、JS コンソールで実行したばかりの (おそらく) 空白のページに接続する必要があります。しかし、現状では、何も開かれていません...私はそれをネットキャットすることさえできません。