Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
setBreakpoint w/o arguments should set one on a current line
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny authored and ry committed Sep 17, 2011
1 parent 4a537c1 commit 145fac7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/_debugger.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 145fac7

Please sign in to comment.