Skip to content

node --inspect devtoolsFrontendUrl using docker container IP #13294

Closed

Description

Version: v7.10.0
Platform: Linux fad72c3b2219 4.9.27-moby #1 SMP Thu May 11 04:01:18 UTC 2017 x86_64 GNU/Linux

Hi,

Running node 7.10.0 on a Docker Container, version: 17.03.1-ce-mac12 (17661), channel: stable.

For development purposes, I'm running node with --inspect with the following command:
./node_modules/.bin/nodemon --inspect=0.0.0.0:9229 index.js

Console output following this is:
chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=0.0.0.0:9229/79ee5f22-17fa-4878-baf5-1aed2b8ca12b
This works fine and lets me inspect and drop breakpoints inside my code.

However, I'm trying to use NIM to automatically pickup and open the new devtools url when my code changes.
NIM takes the devtoolsFrontendUrl from http://localhost:9229/json, which in this current case is:
chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=172.18.0.2:9229/79ee5f22-17fa-4878-baf5-1aed2b8ca12b
This does not work: I can't inspect my code through this url.

Essentially, devToolsFrontendUrl spits out my container's IP whereas the console log correctly uses the 0.0.0.0 IP that I provided to --inspect
I'm forced to change the ip to 0.0.0.0 to make it work.

Any idea why it behaves that way, and what I can do to automatically pickup the correct address ?

Thanks

Activity

  1. added
    inspectorIssues and PRs related to the V8 inspector protocol.
    on May 30, 2017
  2. Trott commented on Apr 29, 2018

    @Trott
    Member

    Is this still an issue in Node.js 10.0.0?

  3. TimothyGu commented on Apr 30, 2018

    @TimothyGu
    Member

    Fixed in #19664, probably.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    inspectorIssues and PRs related to the V8 inspector protocol.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions