When I launch a script using node-debug, it attempts to navigate to the URL localhost/debug?port=5858 but does not find a page served there.
If I change the "localhost" to 127.0.0.1 everything works fine.
I can ping localhost and it resolves appropriately to 127.0.0.1
Any ideas?
localhost has an IPv6 address (::1) as well as an IPv4 address (127.0.0.1). My guess is that your web server is only serving over IPv4, and chrome is preferring the IPv6 address.
Note the "tcp46" in the last line -- that means the web server is listening for both TCP/IPv4 and TCP/IPv6 connections, If you run the same command, I suspect you'll see just "tcp4".
I'm not familiar with Node.js, but this posting seems to imply you can listen on both localhost addresses by using
server.listen(80, '::')
. Alternately, you could create separate listeners for the IPv4 and IPv6 addresses, as described here.