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

node --inspect not working #538

Closed
navinSing opened this issue Mar 16, 2017 · 3 comments
Closed

node --inspect not working #538

navinSing opened this issue Mar 16, 2017 · 3 comments

Comments

@navinSing
Copy link

Using

docker service create --name aserv -p 9229:9229 -p 4848:4849 -p 18081:8080 node:7.7.2-alpine node --inspect=127.0.0.1:4849 /src/start.js

// tried all combinations
--inspect
--inspect=127.0.0.1:9229
--inspect=127.0.0.1:4848
--inspect=127.0.0.1:4849

Chrome version : 55.0
// added the following in chrome
chrome://inspect/#devices

Target discovery settings (Remote Target)
192.168.1.100:9229
192.168.1.100:4848
192.168.1.100:4849
localhost:9229
localhost:4848

And Didn't worked.

What is the best way to do this.

  1. If we are using docker swarm the remote IP may not be available
  2. how does port tunneling work here
  3. and new url hash like
    chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=10.255.0.11:9229/c90e8346-11d6-47cf-aca4-d2360769bdd7

Both IP : 10.255.0.11
and hash : c90e8346-11d6-47cf-aca4-d2360769bdd7
are changing.. which means that i have to check the application logs to get this :S weird.
Can't the hash be sent as a parameter to command line .. or some other way to avoid this hash

Earlier with --debug it was not.
how do i debug a service in a swarm

@navinSing
Copy link
Author

fixed , my bad

@waqas64
Copy link

waqas64 commented Apr 6, 2017

can you please share the fix.

@joshgav
Copy link

joshgav commented Apr 7, 2017

you need to use --inspect=0.0.0.0:9229 because Docker doesn't route 127.0.0.1 through. Note this (comment) though, since 7.7.4 there's a bug that makes this not work. Suggestions there would be welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants