Skip to content

cluster: Add support to cluster to work with `NODE_OPTIONS="--inspect"

Rodrigo Muino Tomonari requested to merge github/fork/sameer-coder/sameer into master

When using cluster and --inspect as cli argument it is correctly handled and each worker will use a different port, this was fixed by #13619. But when env var NODE_OPTIONS="--inspect" is set this logic doesn't apply and the workers will fail as they try to attach to the same port.

Fixes: https://github.com/nodejs/node/issues/19026

Checklist
  • [x ] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x ] tests and/or benchmarks are included
  • [x ] commit message follows commit guidelines

Affected core subsystem(s)

  • cluster

Merge request reports

Loading