@ -160,7 +160,7 @@ function Client() {
protocol . execute ( d ) ;
protocol . execute ( d ) ;
} ) ;
} ) ;
protocol . onResponse = this . _ onResponse . bind ( thi s) ;
protocol . onResponse = ( res ) => this . _ onResponse ( re s) ;
}
}
inherits ( Client , net . Socket ) ;
inherits ( Client , net . Socket ) ;
exports . Client = Client ;
exports . Client = Client ;
@ -735,7 +735,7 @@ function Interface(stdin, stdout, args) {
prompt : 'debug> ' ,
prompt : 'debug> ' ,
input : this . stdin ,
input : this . stdin ,
output : this . stdout ,
output : this . stdout ,
eval : this . controlEval . bind ( this ) ,
eval : ( code , ctx , file , cb ) => this . controlEval ( code , ctx , file , cb ) ,
useGlobal : false ,
useGlobal : false ,
ignoreUndefined : true
ignoreUndefined : true
} ;
} ;
@ -766,7 +766,7 @@ function Interface(stdin, stdout, args) {
} ) ;
} ) ;
// Handle all possible exits
// Handle all possible exits
process . on ( 'exit' , this . killChild . bind ( this ) ) ;
process . on ( 'exit' , ( ) => this . killChild ( ) ) ;
process . once ( 'SIGTERM' , process . exit . bind ( process , 0 ) ) ;
process . once ( 'SIGTERM' , process . exit . bind ( process , 0 ) ) ;
process . once ( 'SIGHUP' , process . exit . bind ( process , 0 ) ) ;
process . once ( 'SIGHUP' , process . exit . bind ( process , 0 ) ) ;
@ -1588,7 +1588,8 @@ Interface.prototype.repl = function() {
this . repl . on ( 'exit' , exitDebugRepl ) ;
this . repl . on ( 'exit' , exitDebugRepl ) ;
// Set new
// Set new
this . repl . eval = this . debugEval . bind ( this ) ;
this . repl . eval = ( code , ctx , file , cb ) =>
this . debugEval ( code , ctx , file , cb ) ;
this . repl . context = { } ;
this . repl . context = { } ;
// Swap history
// Swap history
@ -1603,7 +1604,8 @@ Interface.prototype.repl = function() {
// Exit debug repl
// Exit debug repl
Interface . prototype . exitRepl = function ( ) {
Interface . prototype . exitRepl = function ( ) {
// Restore eval
// Restore eval
this . repl . eval = this . controlEval . bind ( this ) ;
this . repl . eval = ( code , ctx , file , cb ) =>
this . controlEval ( code , ctx , file , cb ) ;
// Swap history
// Swap history
this . history . debug = this . repl . rli . history ;
this . history . debug = this . repl . rli . history ;
@ -1690,8 +1692,8 @@ Interface.prototype.trySpawn = function(cb) {
// pipe stream into debugger
// pipe stream into debugger
this . child = spawn ( process . execPath , childArgs ) ;
this . child = spawn ( process . execPath , childArgs ) ;
this . child . stdout . on ( 'data' , this . childPrint . bind ( this ) ) ;
this . child . stdout . on ( 'data' , ( text ) => this . childPrint ( text ) ) ;
this . child . stderr . on ( 'data' , this . childPrint . bind ( this ) ) ;
this . child . stderr . on ( 'data' , ( text ) => this . childPrint ( text ) ) ;
}
}
this . pause ( ) ;
this . pause ( ) ;