Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ function masterInit() {
workerEnv.NODE_UNIQUE_ID = '' + id;

for (var i = 0; i < execArgv.length; i++) {
var match = execArgv[i].match(/^(--debug|--debug-brk)(=\d+)?$/);
var match = execArgv[i].match(/^(--debug|--debug-(brk|port))(=\d+)?$/);

if (match) {
execArgv[i] = match[1] + '=' + debugPort;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ var common = require('../common');
var assert = require('assert');
var spawn = require('child_process').spawn;

var args = [ common.fixturesDir + '/clustered-server/app.js' ];
var child = spawn(process.execPath, args, {
stdio: [ 'pipe', 'pipe', 'pipe', 'ipc' ]
});
var port = common.PORT + 42;
var args = ['--debug-port=' + port,
common.fixturesDir + '/clustered-server/app.js'];
var options = { stdio: ['inherit', 'inherit', 'pipe', 'ipc'] };
var child = spawn(process.execPath, args, options);

var outputLines = [];
var outputTimerId;
var waitingForDebuggers = false;
Expand Down Expand Up @@ -83,11 +85,11 @@ process.on('exit', function onExit() {
function assertOutputLines() {
var expectedLines = [
'Starting debugger agent.',
'Debugger listening on port ' + 5858,
'Debugger listening on port ' + (port + 0),
'Starting debugger agent.',
'Debugger listening on port ' + 5859,
'Debugger listening on port ' + (port + 1),
'Starting debugger agent.',
'Debugger listening on port ' + 5860,
'Debugger listening on port ' + (port + 2),
];

// Do not assume any particular order of output messages,
Expand Down
63 changes: 0 additions & 63 deletions test/sequential/test-debug-cluster.js

This file was deleted.