diff --git a/lib/_debugger.js b/lib/_debugger.js index 41d3fc4210..b8a3177d68 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -1360,6 +1360,12 @@ Interface.prototype.setBreakpoint = function(script, line, script = this.client.currentScript; } + if (script === undefined) { + this.print('Cannot determine the current script, ' + + 'make sure the debugged process is paused.'); + return; + } + if (/\(\)$/.test(script)) { // setBreakpoint('functionname()'); var req = {