@ -462,7 +462,7 @@ Client.prototype.setBreakpoint = function(req, cb) {
} ;
} ;
Client . prototype . clearBreakpoint = function ( req , cb ) {
Client . prototype . clearBreakpoint = function ( req , cb ) {
var req = {
req = {
command : 'clearbreakpoint' ,
command : 'clearbreakpoint' ,
arguments : req
arguments : req
} ;
} ;
@ -1352,9 +1352,10 @@ Interface.prototype.setBreakpoint = function(script, line,
return ;
return ;
}
}
let req ;
if ( /\(\)$/ . test ( script ) ) {
if ( /\(\)$/ . test ( script ) ) {
// setBreakpoint('functionname()');
// setBreakpoint('functionname()');
var req = {
req = {
type : 'function' ,
type : 'function' ,
target : script . replace ( /\(\)$/ , '' ) ,
target : script . replace ( /\(\)$/ , '' ) ,
condition : condition
condition : condition
@ -1380,7 +1381,6 @@ Interface.prototype.setBreakpoint = function(script, line,
if ( ambiguous ) return this . error ( 'Script name is ambiguous' ) ;
if ( ambiguous ) return this . error ( 'Script name is ambiguous' ) ;
if ( line <= 0 ) return this . error ( 'Line should be a positive value' ) ;
if ( line <= 0 ) return this . error ( 'Line should be a positive value' ) ;
var req ;
if ( scriptId ) {
if ( scriptId ) {
req = {
req = {
type : 'scriptId' ,
type : 'scriptId' ,
@ -1651,7 +1651,7 @@ Interface.prototype.trySpawn = function(cb) {
var isRemote = false ;
var isRemote = false ;
if ( this . args . length === 2 ) {
if ( this . args . length === 2 ) {
var match = this . args [ 1 ] . match ( /^([^:]+):(\d+)$/ ) ;
const match = this . args [ 1 ] . match ( /^([^:]+):(\d+)$/ ) ;
if ( match ) {
if ( match ) {
// Connecting to remote debugger
// Connecting to remote debugger
@ -1675,7 +1675,7 @@ Interface.prototype.trySpawn = function(cb) {
}
}
isRemote = true ;
isRemote = true ;
} else {
} else {
var match = this . args [ 1 ] . match ( /^--port=(\d+)$/ ) ;
const match = this . args [ 1 ] . match ( /^--port=(\d+)$/ ) ;
if ( match ) {
if ( match ) {
// Start debugger on custom port
// Start debugger on custom port
// `node debug --port=5858 app.js`
// `node debug --port=5858 app.js`