Permalink
Browse files

[debugger] setBreakpoint w/o arguments should set one on a current line

  • Loading branch information...
1 parent 95c54db commit 06b46492d903a41cff4c4a220de286780bdad771 @indutny committed Sep 15, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/_debugger.js
View
@@ -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) {

0 comments on commit 06b4649

Please sign in to comment.