我已经按照以下说明进行了操作:
https://github.com/ariya/phantomjs/wiki/Troubleshooting
我在这里看到了这样的情况:
Getting remote debugging set up with PhantomJS
但是我无论如何也不能让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上看到一个开放的端口吗?据我所知,Chrome应该连接到一个(可能的)空白页面,我在JS控制台上运行了__run()。但就目前而言,没有什么是开放的.我甚至不能在网络上看到它。
发布于 2014-04-29 20:12:41
运行phantomjs,就像sudo似乎可以做到的那样
https://stackoverflow.com/questions/19532580
复制相似问题