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.
Build 200406080606 I have driven to serious problems when debugging a multithread application. When I reached a breakpoint, I did Step Over, the debugger reached other breakpoint int different thread sooner. I caused that: 1) I was confused what the "hell source" I have reached. 2) There was no way how to finish previous Step Over -- all the debugging work was lost. BTW: It is not very rare -- good example is in the WebApps when debugging a filter for a frame-based HTML files. Web server get the request which are solved in separate threads. The only way how to debug that filter was synchronizing. Solution: add 1) Give the user an information that debugged thread was changed -- it could be at least a status bar message. Provide this solution on all actions when you expect reaching some source: Step Over, Step Into, Step Out, Run to Cursor. It is not necessary to do it on Continue action. add 2) When different thread is reached, give the user a chance to "Set" a breakpoint to the previous target (if possible). Notice: Some solutions could appear like an enhancement, but I think that some easy preliminary solution could be provided as a fix.
Thank for your valuable report. I am not sure if we will be able to fix it for nb40 (ui changes required).
This bug makes the debugger unusable when working with projects such as Java3D and Project Looking Glass, and I have not discovered a workaround so I've raised it to P2. How about an implementation change in which if a breakpoint is hit in another thread during a single step then that thread is put to sleep. Informing the user of this would be desirable but could wait until 4.1. This change would at least mean that we could debug threaded applications in NB.
Too risky to do it now. We plan to implement it for nb4.1.
See also issues #40901, #17855
*** Issue 81226 has been marked as a duplicate of this issue. ***
Please note that if you use "Continue" action after the breakpoint in another thread was hit, the step will be finished then and you'll get back to the original context. Freezing of threads is actually one possible solution, but we have to have some deadlock-detection mechanism. The thread in which you're stepping can be easily blocked by waiting to acquire some monitor that is held by another thread.
Fixed in trunk. We provide a dialog notifying that a step is interrupted by breakpoint. The user can decide whether the breakpoint or the step is in their interest. /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/JPDAStepImpl.java,v <-- JPDAStepImpl.java new revision: 1.8; previous revision: 1.7 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/JPDADebuggerImpl.java,v <-- JPDADebuggerImpl.java new revision: 1.116; previous revision: 1.115 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/Bundle.properties,v <-- Bundle.properties new revision: 1.74; previous revision: 1.73 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/breakpoints/BreakpointImpl.java,v <-- BreakpointImpl.java new revision: 1.35; previous revision: 1.34 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/breakpoints/Bundle.properties,v <-- Bundle.properties new revision: 1.9; previous revision: 1.8 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/actions/StepActionProvider.java,v <-- StepActionProvider.java new revision: 1.37; previous revision: 1.36
In 6.0M10 is the modal informational dialog changed to non-modal and less intrusive solution - an informational panel in Threads View: /cvs/ide/golden/deps.txt,v <-- deps.txt new revision: 1.609; previous revision: 1.608 /cvs/debuggerjpda/nbproject/project.xml,v <-- project.xml new revision: 1.21; previous revision: 1.20 /cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/breakpoints/BreakpointImpl.java,v <-- BreakpointImpl.java new revision: 1.41; previous revision: 1.40 /cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/breakpoints/Bundle.properties,v <-- Bundle.properties new revision: 1.13; previous revision: 1.12 RCS file: /cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/util/ThreadInfoPanel.form,v /cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/util/ThreadInfoPanel.form,v <-- ThreadInfoPanel.form initial revision: 1.1 RCS file: /cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/util/ThreadInfoPanel.java,v /cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/util/ThreadInfoPanel.java,v <-- ThreadInfoPanel.java initial revision: 1.1 RCS file: /cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/util/information_16.png,v /cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/util/information_16.png,v <-- information_16.png initial revision: 1.1
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.