mirror of
https://github.com/nodejs/node-v0.x-archive.git
synced 2026-04-28 03:01:10 -04:00
Compare commits
1 Commits
move-debug
...
pr6651
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e33718c36 |
@@ -25,6 +25,7 @@ var util = require('util'),
|
||||
vm = require('vm'),
|
||||
repl = require('repl'),
|
||||
inherits = util.inherits,
|
||||
assert = require('assert'),
|
||||
spawn = require('child_process').spawn;
|
||||
|
||||
exports.start = function(argv, stdin, stdout) {
|
||||
@@ -1612,6 +1613,7 @@ Interface.prototype.trySpawn = function(cb) {
|
||||
childArgs = this.args;
|
||||
|
||||
this.killChild();
|
||||
assert(!this.child);
|
||||
|
||||
if (this.args.length === 2) {
|
||||
var match = this.args[1].match(/^([^:]+):(\d+)$/);
|
||||
@@ -1647,12 +1649,10 @@ Interface.prototype.trySpawn = function(cb) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.child) {
|
||||
this.child = spawn(process.execPath, childArgs);
|
||||
this.child = spawn(process.execPath, childArgs);
|
||||
|
||||
this.child.stdout.on('data', this.childPrint.bind(this));
|
||||
this.child.stderr.on('data', this.childPrint.bind(this));
|
||||
}
|
||||
this.child.stdout.on('data', this.childPrint.bind(this));
|
||||
this.child.stderr.on('data', this.childPrint.bind(this));
|
||||
|
||||
this.pause();
|
||||
|
||||
@@ -1709,8 +1709,10 @@ Interface.prototype.trySpawn = function(cb) {
|
||||
client.connect(port, host);
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
self.print('connecting to port ' + port + '..', true);
|
||||
attemptConnect();
|
||||
}, 50);
|
||||
this.child.stderr.once('data', function() {
|
||||
setImmediate(function() {
|
||||
self.print('connecting to port ' + port + '..', true);
|
||||
attemptConnect();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
@@ -91,7 +91,7 @@ function startDebugger(scriptToDebug) {
|
||||
});
|
||||
|
||||
quit();
|
||||
}, 5000).unref();
|
||||
}, 10000).unref();
|
||||
|
||||
process.once('uncaughtException', function(e) {
|
||||
console.error('UncaughtException', e, e.stack);
|
||||
|
||||
Reference in New Issue
Block a user