diff --git a/lib/_debugger.js b/lib/_debugger.js index aba63a00a20..73abad0a4e4 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -57,9 +57,6 @@ exports.start = function(argv, stdin, stdout) { }; -var args = process.argv.slice(2); -args.unshift('--debug-brk'); - // @@ -708,12 +705,13 @@ function SourceInfo(body) { // This class is the repl-enabled debugger interface which is invoked on // "node debug" -function Interface(stdin, stdout) { +function Interface(stdin, stdout, args) { var self = this, child; this.stdin = stdin; this.stdout = stdout; + this.args = args; var streams = { stdin: stdin, @@ -1413,7 +1411,7 @@ Interface.prototype.trySpawn = function(cb) { this.killChild(); - this.child = spawn(process.execPath, args); + this.child = spawn(process.execPath, this.args); this.child.stdout.on('data', this.childPrint.bind(this)); this.child.stderr.on('data', this.childPrint.bind(this));