function BabelDebugger(options) {
Debugger.call(this, options)
}n/a
function BabelDebugger(options) {
Debugger.call(this, options)
}n/a
function clearAll() {
var self = this
return this.listBreakpoints()
.then(function(bps) {
return bps.map(function(bp) {
return self.clearBreakpoint(bp)
})
})
}...
if (event.event === 'afterCompile' && event.body.script.name === filename) {
debug.client.end()
debug.removeListener('event', listener)
debug.removeListener('error', onError)
}
})
debug.clearAll()
.then(function(result) {
return debug.setInitialBreakpoint(filename)
})
.then(function(result) {
return debug.sendContinue()
})
}, 1000)
...function clearBreakpoint(breakpoint) {
return this.send({
command: 'clearbreakpoint',
arguments: {
type: breakpoint.type,
breakpoint: breakpoint.number
}
})
}...
})
function clearAll() {
var self = this
return this.listBreakpoints()
.then(function(bps) {
return bps.map(function(bp) {
return self.clearBreakpoint(bp)
})
})
}
function listBreakpoints() {
return this.send({
command: 'listbreakpoints'
}).get('res').get('body').get('breakpoints')
...function listBreakpoints() {
return this.send({
command: 'listbreakpoints'
}).get('res').get('body').get('breakpoints')
}...
sendContinue: sendContinue,
setInitialBreakpoint: setInitialBreakpoint,
send: Promise.promisify(Debugger.prototype.send)
})
function clearAll() {
var self = this
return this.listBreakpoints()
.then(function(bps) {
return bps.map(function(bp) {
return self.clearBreakpoint(bp)
})
})
}
function listBreakpoints() {
...send = function (_arg0, _arg1, _arg2) {
'use strict';
var len = arguments.length;
var promise = new Promise(INTERNAL);
promise._captureStackTrace();
var nodeback = nodebackForPromise(promise, false);
var ret;
var callback = tryCatch(fn);
switch(len) {
case 1:ret = callback.call(this, _arg0, nodeback); break;
case 0:ret = callback.call(this, nodeback); break;
case 2:ret = callback.call(this, _arg0, _arg1, nodeback); break;
case 3:ret = callback.call(this, _arg0, _arg1, _arg2, nodeback); break;
default:
var args = new Array(len + 1);
var i = 0;
for (var i = 0; i < len; ++i) {
args[i] = arguments[i];
}
args[i] = nodeback;
ret = callback.apply(this, args);
break;
}
if (ret === errorObj) {
promise._rejectCallback(maybeWrapAsError(ret.e), true, true);
}
if (!promise._isFateSealed()) promise._setAsyncGuaranteed();
return promise;
}...
debugServer.on('listening', function() {
setTimeout(function() {
console.log(config)
var debug = new Debugger({
port: config.debugPort,
host: '127.0.0.1'
})
debug.send({command: 'continue'}, function() {
debug.send({
command: 'setBreakpoint',
arguments: {
type: 'scriptRegExp',
target: config.script,
line: 1,
column: 1
...function sendContinue() {
return this.send({command: 'continue'})
}...
})
debug.clearAll()
.then(function(result) {
return debug.setInitialBreakpoint(filename)
})
.then(function(result) {
return debug.sendContinue()
})
}, 1000)
}
return childProcess
}
...function setInitialBreakpoint(target) {
return this.send({
command: 'setBreakpoint',
arguments: {
type: 'script',
target: target,
line: 1,
column: 1
}
})
}...
debug.removeListener('event', listener)
debug.removeListener('error', onError)
}
})
debug.clearAll()
.then(function(result) {
return debug.setInitialBreakpoint(filename)
})
.then(function(result) {
return debug.sendContinue()
})
}, 1000)
}
return childProcess
...