Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
don't use global vars
  • Loading branch information
indutny authored and ry committed Sep 23, 2011
1 parent 2010071 commit 78d91ff
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/_debugger.js
Expand Up @@ -57,9 +57,6 @@ exports.start = function(argv, stdin, stdout) {
};


var args = process.argv.slice(2);
args.unshift('--debug-brk');



//
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 78d91ff

Please sign in to comment.