Skip to content

Debugger doesn't work for processes which fork other processes #9435

@medikoo

Description

@medikoo

I'm running:

$ node --inspect some-node-script.js

Where some-node-script.js uses plain child_process.fork (run with defaults mostly) calls to initialize few other processes internally. Right after that I receive message Unable to open devtools socket: address already in use:

$ node -v
v7.0.0
$ node --inspect some-node-script.js
Debugger listening on port 9229.
Warning: This is an experimental feature and could change at any time.
To start debugging, open the following URL in Chrome:
    chrome-devtools://devtools/remote/serve_file/@60cd6e859b9f557d2312f5bf532f6aec5f284980/inspector.html?experiments=true&v8only=true&ws=localhost:9229/edbce9e9-0a9d-4c24-8f2b-bcaaeb4a5965
Unable to open devtools socket: address already in use

Also forked process crashes so technically application doesn't run (I've skipped that part of a log to avoid not related noise).

Behavior is same in both latest Node.js v7 and v6 (Tested on OSX, both El Captain and Sierra, with latest Chrome on board)

Am I doing something wrong, or there's no support currently for multi-process Node.js apps?

I've found similar issue which states that this probably should just work, but gives no clue why it actually doesn't.

I'll be happy to provide simple test case if needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    child_processIssues and PRs related to the child_process subsystem.feature requestIssues that request new features to be added to Node.js.inspectorIssues and PRs related to the V8 inspector protocolstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions