This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Consider following code: function clone(el){ iterator++; $(el).parent().append("<li>clone "+iterator+"</li>"); // breakpoint here } Set the breakpoint to the line with jquery usage and run html file. When clone() function is called, code execution stops correctly on the line with breakpoint. Continue (F5). Now modify it like this (simple add a console.log line, nothing else): ... iterator++; console.log("A"); $(el).parent().append("<li>clone "+iterator+"</li>"); // breakpoint here ... and save the file. File is refreshed in browser. Now when the clone() function is triggered, the code execution stops on the line with console.log(). Note that correct line is colored red and also line number in Breakpoints window reflects current (increased) line number of the line with jquery. Product Version: NetBeans IDE Dev (Build EaselCSS-428-on-20120803) Java: 1.7.0_06-ea; Java HotSpot(TM) Client VM 23.2-b09 System: Linux version 3.0.0-23-generic running on i386; UTF-8; en_US (nb)
Listening on line changes is not implemented yet.
*** Bug 217259 has been marked as a duplicate of this bug. ***
It this hard to fix? Could it be resolved this week? :-) Implementation wise I think you do not need to listen on changes but when debugging session is restarted (eg. on consequent Run operation) the breakpoints should be updated in WebKit runtime.
Fixed by changeset: 230787:c33dc69bfb45 http://hg.netbeans.org/web-main/rev/c33dc69bfb45 We re-submit the breakpoint after reload if the line has changed.
thanks a lot, seems to work quite good. I noticed one thing: Let's say I have this code: function dummyClipBoard2() { console.log("===== LOG ========"); // line breakpoint here print(); } Now delete content of line (let's call it X) with the breakpoint, so result is: function dummyClipBoard2() { print(); } Now X is still red, and because the line is empty, code execution stops on the line X+1, (so print()), which is at the time green. The same happens if you add breakpoint to line that contains only comment. It stops at the next executed line. While I personally like this behavior, is this as expected/wanted? I checked Java debugging and with such case the java debugging fails with some message ("Not able to submit breakpoint LineBreakpoint...")... Product Version: NetBeans IDE Dev (Build EaselCSS-556-on-20120824) Java: 1.7.0_06; Java HotSpot(TM) Client VM 23.2-b09 System: Linux version 3.2.0-29-generic-pae running on i386; UTF-8; en_US (nb)
When debugger session is started there are events coming back from debugger, eg. Debugger.breakpointResolved which tell us (I think) where exactly the breakpoint was resolved. Could we use them to automatically "adjust" breakpoint or put it into a "not a valid code breakpoint" state?
I filed last comment as issue 217486.
Integrated into 'main-golden', will be available in build *201209031048* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/c33dc69bfb45 User: mentlicher@netbeans.org Log: #216360: Listen on the Line object to update LineBreakpoint's line number.
I'm sorry, but this is happening again. Let's say you have function like: function test(){ window.console.log("1"); window.console.log("2"); window.console.log("3"); // line breakpoint here } Now run it and somehow call test(), code execution stops OK. Now modify test() and repeat steps above (long wait due to 220836): function test(){ window.console.log("1"); window.console.log("2"); window.console.log("1"); window.console.log("3"); // line breakpoint stays here, code stops here, ok } Now add another similar modification and save file: function test(){ window.console.log("1"); window.console.log("2"); window.console.log("1"); window.console.log("2"); // code stops here, wrong window.console.log("3"); // line breakpoint stays here, } It seems like it works with one modification (one reload?) and then it starts to stop at incorrect lines Product Version: NetBeans IDE Dev (Build web-main-9296-on-20121121) Java: 1.7.0_10-ea; Java HotSpot(TM) Client VM 23.6-b04 Runtime: Java(TM) SE Runtime Environment 1.7.0_10-ea-b16 System: Linux version 3.2.0-33-generic-pae running on i386; UTF-8; en_US (nb)
At first look, it looks like #220836 also fixed this issue but I'll test it more thoroughly later today/on Monday.
Only partially. When a code is removed from a line with a breakpoint, which makes the line empty, the execution is suspended on a next line, but the breakpoint annotation stays on the empty line. This is described in comment #c5. Breakpoint line updates are now fixed by changeset: 241226:b2a01676fb1a http://hg.netbeans.org/web-main/rev/b2a01676fb1a
Integrated into 'main-golden', will be available in build *201212030001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/b2a01676fb1a User: mentlicher@netbeans.org Log: #216360: Update line breakpoints when Debugger.breakpointResolved is received.
I no longer can reproduce it => verified, thanks Product Version: NetBeans IDE 7.3 RC1 (Build 201301142100) Java: 1.7.0_10; Java HotSpot(TM) Client VM 23.6-b04 Runtime: Java(TM) SE Runtime Environment 1.7.0_10-b18 System: Linux version 3.2.0-35-generic-pae running on i386; UTF-8; en_US (nb)