Skip to content

Commit 145fac7

Browse files
indutnyry
authored andcommitted
setBreakpoint w/o arguments should set one on a current line
1 parent 4a537c1 commit 145fac7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/_debugger.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,12 @@ Interface.prototype.setBreakpoint = function(script, line,
11101110
scriptId,
11111111
ambiguous;
11121112

1113+
// setBreakpoint() should insert breakpoint on current line
1114+
if (script === undefined) {
1115+
script = this.client.currentScript;
1116+
line = this.client.currentSourceLine + 1;
1117+
}
1118+
11131119
if (script != +script && !this.client.scripts[script]) {
11141120
Object.keys(this.client.scripts).forEach(function(id) {
11151121
if (self.client.scripts[id].name.indexOf(script) !== -1) {

0 commit comments

Comments
 (0)