Chrome remote debugging doesn't work with IP

前端 未结 7 834
长发绾君心
长发绾君心 2020-12-04 16:54

I\'m trying to remote debugg a chrome instance using the remote debug option in chrome:

chrome.exe --remote-debugging-port=1337

as describe

相关标签:
7条回答
  • 2020-12-04 17:42

    The easiest way of sharing your debugging session with another computer is with socat. For example, if you've enabled the remote debugging protocol on port 1337 using

    chromium --remote-debugging-port=1337
    

    Then, you can create a tunnel using socat,

    socat tcp-listen:5656,fork tcp:localhost:1337
    

    After doing this, anyone can just visit http://<YOUR_IP_OR_HOSTNAME>:5656/ and immediately use the debugger.

    When you're done, press Ctrl + C to terminate socat and thus stop the tunneling.
    If the previous code does not work, check whether the firewall (e.g. iptables) is blocking access. If the firewall is OK, check whether the IP address or host name is actually correct. To see whether the traffic is correctly forwarded/tunnelled, visit http://localhost:5656/ and verify that there's a Webkit debugger instance running.

    0 讨论(0)
提交回复
热议问题