Getting remote debugging set up with PhantomJS

前端 未结 4 773
后悔当初
后悔当初 2021-01-30 16:56

I\'m trying to set up remote debugging with PhantomJS, without much luck. I am following the instructions at https://github.com/ariya/phantomjs/wiki/Troubleshooting. I have a li

4条回答
  •  被撕碎了的回忆
    2021-01-30 17:51

    I had problems getting debugging to work on Mac using Chrome Version 57.0.2987.133 (64-bit). I got the debugger to open on localhost:9000 (127.0.0.1:9000 didn't work for me) but after entering __run() (yes, with double underscore), there was no response. I could see other js files under Sources, mine was listed but was empty. (I did enable debugging in chrome)

    I tried the same on safari and it all worked as advertised.

    UPDATE for Chrome: (from Thiago Fernandes below): Apparently the issue is caused by the Chrome not accepting the enter key, so the workaround is to evaluate this function inside chrome console, to get the enterKey working:

    function isEnterKey(event) { return (event.keyCode !== 229 && event.keyIdentifier === "Enter") || event.keyCode === 13; } 
    

提交回复
热议问题