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.
While searching for race condition bug in FolderInstanceTest (which includes three threads running and communicating) I've got to a situation when I needed to stop one thread, but let other two continue step by step to simulate the worsest thread switching I could imagine. The problem is right now there is no way to say, go on, but let one thread stay. I have figured out a workaround: boolean stop = false; do { // nothing } while (stop); place a breakpoint to the //nothing line and when hit change the value of stop to true via debugger properties. Works, but requires modification of source, and is pretty ugly anyway. Instead of this I ask for special status of a thread: Suspended by user forever. Which would mean that the debugger will never resume the thread on F8, F7, Go on, etc... I imagine a small change in Thread properties: Instead of Suspended=True/False put there Status=Suspended/Running/Stopped where "Stopped" could be choosen just by user to indicate that this thread should never be resumed... I might try to create a patch if you give me some hints...
Target milestone -> 3.3.1.
I really need it. At least tell me where to implement the enhancement.
As a result of discussion on nbui we have find out that there is an inconsistence bug in the debugger. See http://www.netbeans.org/servlets/ReadMsg?msgId=243417&listName=nbui It is possible to suspend thread for ever when it is running, but it is not possible to do it when it has stopped at breakpoint. That is why I have changed this issue to be a defect, but changed the reported version to be 3.4dev, because I do not expect this to be fixed in 3.3 version.
Changed back to ENHANCEMENT. The bug described is filled as a separate issue 19820.
Changes should be done in org.netbeans.debugger.core.support.java.JavaThread org.netbeans.debugger.core.support.java.nodes.ThreadNode org.netbeans.debuggerjpda.core.*.JpdaThread
Set target milestone to TBD
Implementing the usage of BreakPointRequest.SUSPEND_EVENT_THREAD would help the problem. Breakpoints have a suspend boolean property which is quite useless, because if it set false the breakpoint does nothing but, prints a line in the debugger console.
Seems to be hot topic again ;-) We are discussing this.
TM should not be 'future' but 'asap' :-)
I think that this issue is already implemented. You should just go to Sessions View - pop-up menu and switch Scope to Debug Current Thread. That should cover your usecase. But the problem is that this feature currently does not work -> P3 bug.
The feature is not implemented. I do not need to run current thread, I need to run all others.
We plan to make the "Debug Current Thread" work into M8. In cooperation with Threads View you can have running/suspended any threads you need during stepping. Since you may encounter "deadlocks" when stepping in a single thread only caused by waiting for other (suspended) threads, we will add some time-based check.
Fixed in trunk. The "Debug Current Thread" option on Session does not resume all threads during stepping. When the step on current thread takes long time, an informational dialog is displayed asking the user whether all other threads should be resumed (because of possible wait for monitors held by other threads). Also thread state is better tracked now, we also prevent from having suspend count of threads greater then 1 (suspend count greater then one is causing strange exceptions and continue is not working as expected). When system option "netbeans.debugger.singleThreadStepping" is set to true, "Debug Current Thread" option is true by default. Otherwise it's false and need to be set for every new session. /cvs/ide/golden/deps.txt,v <-- deps.txt new revision: 1.468; previous revision: 1.467 /shared/data/ccvs/repository/debuggerjpda/nbproject/project.xml,v <-- project.xml new revision: 1.20; previous revision: 1.19 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/Bundle.properties,v <-- Bundle.properties new revision: 1.73; previous revision: 1.72 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/JPDADebuggerImpl.java,v <-- JPDADebuggerImpl.java new revision: 1.115; previous revision: 1.114 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/JPDAStepImpl.java,v <-- JPDAStepImpl.java new revision: 1.7; previous revision: 1.6 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/actions/JPDADebuggerActionProvider.java,v <-- JPDADebuggerActionProvider.java new revision: 1.13; previous revision: 1.12 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/actions/StepActionProvider.java,v <-- StepActionProvider.java new revision: 1.36; previous revision: 1.35 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/actions/StepIntoActionProvider.java,v <-- StepIntoActionProvider.java new revision: 1.33; previous revision: 1.32 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/actions/StepOperationActionProvider.java,v <-- StepOperationActionProvider.java new revision: 1.3; previous revision: 1.2 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/JPDAThreadGroupImpl.java,v <-- JPDAThreadGroupImpl.java new revision: 1.7; previous revision: 1.6 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/JPDAThreadImpl.java,v <-- JPDAThreadImpl.java new revision: 1.26; previous revision: 1.25 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/ThreadsTreeModel.java,v <-- ThreadsTreeModel.java new revision: 1.9; previous revision: 1.8 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/util/Operator.java,v <-- Operator.java new revision: 1.46; previous revision: 1.45 /shared/data/ccvs/repository/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/actions/RunIntoMethodActionProvider.java,v <-- RunIntoMethodActionProvider.java new revision: 1.13; previous revision: 1.12
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.