ericclemmons/start-server-webpack-plugin

Allow running child with --inspect

wmertens opened this issue · 4 comments

This can be achieved easily with

      cluster.setupMaster({ exec: existsAt, execArgv: ['--inspect'].concat(process.execArgv) });

but I'd like to know how to make it configurable. Second argument with options? With Boolean? First argument either string or options?

Also: make port configurable? auto-detect an open port?

Hello,

I cannot change the port.

This is my config

    new StartServerPlugin({
            name: filename,
            nodeArgs: ['--inspect=127.0.0.1:9231' ]
        }),

it always appends --inspect-port=9230 after executed

Debugger listening on ws://127.0.0.1:9230/c4cec3b5-cf2c-45f6-a72b-4921794bdc41
For help see https://nodejs.org/en/docs/inspector
Hash: 91c98894a7a5ef50a4cd
Version: webpack 3.5.1

ps ax | grep node

76143 s063  S+     0:02.65 /usr/local/Cellar/node/8.7.0/bin/node --inspect=127.0.0.1:9231 --inspect-port=9230

i tried it before

nodeArgs: ['--inspect=127.0.0.1:9231', '--inspect-port=9231' ]

it became like this

76685 s063  S+     0:01.81 /usr/local/Cellar/node/8.7.0/bin/node --inspect=127.0.0.1:9231 --inspect-port=9231 --inspect-port=9230 /Users/dev-115/projects