diff --git a/lib/_debugger.js b/lib/_debugger.js index 4b01d39e5b5..3b22b87ef89 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -1356,6 +1356,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 = {