UI counts the lines from 1, so we need to substract one when setting breakpoints
1.1 --- a/dew4nb/src/org/netbeans/modules/dew4nb/services/debugger/LineBreakpointProviderJS.java Fri May 09 17:39:18 2014 +0200
1.2 +++ b/dew4nb/src/org/netbeans/modules/dew4nb/services/debugger/LineBreakpointProviderJS.java Wed May 21 14:42:59 2014 +0200
1.3 @@ -43,7 +43,6 @@
1.4 package org.netbeans.modules.dew4nb.services.debugger;
1.5
1.6 import java.net.URL;
1.7 -import java.util.logging.Level;
1.8 import org.netbeans.api.debugger.Breakpoint;
1.9 import org.openide.filesystems.FileObject;
1.10 import org.openide.text.Line;
1.11 @@ -62,7 +61,7 @@
1.12 if (file.hasExt("js")) {
1.13 ClassLoader l = Lookup.getDefault().lookup(ClassLoader.class);
1.14 Class<?> fl = Class.forName("org.netbeans.modules.javascript2.debug.breakpoints.FutureLine", true, l);
1.15 - Line ln = (Line) fl.getConstructor(URL.class, int.class).newInstance(file.toURL(), line);
1.16 + Line ln = (Line) fl.getConstructor(URL.class, int.class).newInstance(file.toURL(), line - 1);
1.17 Class<?> jslb = Class.forName("org.netbeans.modules.javascript2.debug.breakpoints.JSLineBreakpoint", true, l);
1.18 return (Breakpoint) jslb.getConstructor(Line.class).newInstance(ln);
1.19 }