Skip to content

node --inspect not working  #538

@navinSing

Description

@navinSing

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions