首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我的PhantomJS远程调试尝试出了什么问题?

我的PhantomJS远程调试尝试出了什么问题?
EN

Stack Overflow用户
提问于 2013-10-23 12:06:03
回答 1查看 814关注 0票数 4

我已经按照以下说明进行了操作:

https://github.com/ariya/phantomjs/wiki/Troubleshooting

我在这里看到了这样的情况:

Getting remote debugging set up with PhantomJS

但是我无论如何也不能让PhantomJS的远程调试起作用。下面是我尝试过的:

代码语言:javascript
复制
[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()。但就目前而言,没有什么是开放的.我甚至不能在网络上看到它。

EN

回答 1

Stack Overflow用户

发布于 2014-04-29 20:12:41

运行phantomjs,就像sudo似乎可以做到的那样

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19532580

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档