diff --git a/lib/_debugger.js b/lib/_debugger.js index 94d12dd75f7..9bac859eba8 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -1110,6 +1110,12 @@ Interface.prototype.setBreakpoint = function(script, line, scriptId, ambiguous; + // setBreakpoint() should insert breakpoint on current line + if (script === undefined) { + script = this.client.currentScript; + line = this.client.currentSourceLine + 1; + } + if (script != +script && !this.client.scripts[script]) { Object.keys(this.client.scripts).forEach(function(id) { if (self.client.scripts[id].name.indexOf(script) !== -1) {