Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow set remote debug listen host/ip #1444

Closed
bmatusiak opened this issue Jan 3, 2014 · 4 comments
Closed

allow set remote debug listen host/ip #1444

bmatusiak opened this issue Jan 3, 2014 · 4 comments
Labels

Comments

@bmatusiak
Copy link

i would like to debug a remote node-webkit app on a different machine..

current method remote debugging works only on localhost

For example, by running nw --remote-debugging-port=9222, you can open http://localhost:9222/ to visit the debugger remotely.

what about by running nw --remote-debugging-port=9222 --remote-debugging-host=0.0.0.0, you can open http://192.168.1.50:9222/ to visit the debugger remotely on a different machine on same network.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@timkalinowski
Copy link

+1
Working with an embedded device this would be a great feature

@timkalinowski
Copy link

My linux solution was a work around to reroute external connections to the localhost port

iptables -t nat -A PREROUTING -p tcp --dport 9222 -j DNAT --to-destination 127.0.0.1:9222

depending on your kernel you may also need to enable local routing

 sysctl -w net.ipv4.conf.eth0.route_localnet=1   

@MadLittleMods
Copy link

👍 Would be really useful for visiting on another machine. Or just allow the server to respond to external connections.

I tried to use localtunnel to expose the port and you can see the instances to inspect and see the dev tools. But there isn't any content in any of tabs and nothing reaches the console (it works fine locally). This could be related to this cause of an empty window, "Your proxy settings: bypass localhost in the settings." which is written on the debugging with devtools page

OSX

The ipfw command is no longer available on OSX which is most equivalent to the iptables command @timkalinowski used on linux and is what is mostly used in examples I found on google. But I was able to get this working on OSX Yosemite with pfctl.

  1. Open up /etc/pf.conf
  2. After this line rdr-anchor "com.apple/*", add the following line
rdr pass inet proto tcp from any to any port 9222 -> 127.0.0.1 port 9222
  1. Load the new config: sudo pfctl -ef /etc/pf.conf

References:

Windows:

netsh
interface portproxy
add v4tov4 listenport=9222 connectaddress=127.0.0.1 connectport=9222 protocol=tcp

To list out the current config: dump

To remove the config entry we just added:

netsh
interface portproxy
delete v4tov4 listenport=9222 protocol=tcp

References:

@stale
Copy link

stale bot commented Nov 7, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 7, 2017
@stale stale bot closed this as completed Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants