Browse Source

[debugger] fixed piping from stdout of child process, fixed eval in debug repl (when not on breakpoint)

Fedor Indutny 13 years ago
parent
commit
fe4b0f40d6
  1. 15
      lib/_debugger.js

15
lib/_debugger.js

@ -409,6 +409,7 @@ Client.prototype.reqScripts = function(cb) {
Client.prototype.reqContinue = function(cb) { Client.prototype.reqContinue = function(cb) {
this.currentFrame = NO_FRAME;
this.req({ command: 'continue' }, function(res) { this.req({ command: 'continue' }, function(res) {
if (cb) cb(res); if (cb) cb(res);
}); });
@ -451,6 +452,7 @@ Client.prototype.step = function(action, count, cb) {
arguments: { stepaction: action, stepcount: count } arguments: { stepaction: action, stepcount: count }
}; };
this.currentFrame = NO_FRAME;
this.req(req, function(res) { this.req(req, function(res) {
if (cb) cb(res); if (cb) cb(res);
}); });
@ -519,7 +521,7 @@ Client.prototype.mirrorObject = function(handle, depth, cb) {
name: prop.name, name: prop.name,
value: mirrorValue value: mirrorValue
}; };
if (value.handle && depth > 0) { if (value && value.handle && depth > 0) {
waiting++; waiting++;
self.mirrorObject(value, depth - 1, function(result) { self.mirrorObject(value, depth - 1, function(result) {
keyValues[i].value = result; keyValues[i].value = result;
@ -760,7 +762,8 @@ Interface.prototype.childPrint = function(text) {
return chunk; return chunk;
}).map(function(chunk) { }).map(function(chunk) {
return '< ' + chunk; return '< ' + chunk;
}).join('\n') + '\n'); }).join('\n'));
this.repl.displayPrompt();
}; };
Interface.prototype.error = function(text) { Interface.prototype.error = function(text) {
@ -807,8 +810,14 @@ Interface.prototype.debugEval = function(code, context, filename, callback) {
return; return;
} }
var frame;
if (client.currentFrame === NO_FRAME) {
frame = NO_FRAME;
};
self.pause(); self.pause();
client.reqFrameEval(code, undefined, function(res) { client.reqFrameEval(code, frame, function(res) {
if (!res.success) { if (!res.success) {
if (res.message) { if (res.message) {
callback(res.message); callback(res.message);

Loading…
Cancel
Save