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.

Bug 166616 - Suspending a thread displays nothing in the debugger console
Summary: Suspending a thread displays nothing in the debugger console
Status: REOPENED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
: 190986 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-06-05 16:12 UTC by Vojtech Sigler
Modified: 2012-10-10 12:21 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vojtech Sigler 2009-06-05 16:12:31 UTC
Product Version: NetBeans IDE 6.7 RC2 (Build 200906042131)
Java: 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16
System: Linux version 2.6.28-11-generic running on i386; UTF-8; en_US (nb)

When I suspend a running thread during a debugging session, there's no info about it in the debugging console. According
to test specification there should be something like 'Thread Thread-1 stopped at Thread.java.sleep'.

IMHO, there should be a similar message when resuming a suspended thread.
Comment 1 Martin Entlicher 2009-06-10 15:58:40 UTC
AFAIK there was never such functionality. The message is printed only when a thread hits a breakpoint or when a step
finishes. Which test specification describe this?

IMHO this would be an overkill to print these messages whenever a thread is paused or resumed. Mainly with Pause that
pauses all threads and Continue, which resumes all thread.
I prefer not to add these messages in this case.
Comment 2 Vojtech Sigler 2009-06-10 16:17:52 UTC
It's in here:
http://wiki.netbeans.org/TS_67_MultiThreadedDebugging#section-TS_67_MultiThreadedDebugging-TestSuiteResumeSuspendThreads.

Quoting the testspec: "The Debugger Console tab of Output view prints Thread Thread-1 stopped at Thread.java.sleep."

If there never was such functionality I don't think it's neccessary to add it. I'll update the test specification.
Comment 3 Martin Entlicher 2009-06-10 16:46:19 UTC
Thanks for the link. Well, the message is printed when you use Pause instead of Suspend directly on the thread.
In this case it's printed because debugger is changed to "paused" state. Then when you press Continue, debugger is
resumed again and "User program running" is printed.

Thus the behavior is a little inconsistent and differs if you use Pause (which suspend all threads) and Suspend (which
suspends only one thread).

Therefore I'm reopening this and reducing to P4. We might solve this by marking the debugger state as suspended when the
current thread is suspended.
Comment 4 Vojtech Sigler 2009-06-11 08:00:04 UTC
Actually, in this case it's not printed, because there are 3 threads running and in the test specification you suspend
just one of them.

How about making the behavior the way that if invoke "pause", which suspends all threads and marks debugger state as
suspended, it prints "User program stopped" as it does now. But If I manually suspend a single thread, it would print
either 'Thread Thread-1 stopped at...' or something like 'Thread-1 suspended by user at...'. That would seem more
consistent to me.
Comment 5 Martin Entlicher 2011-01-22 00:22:29 UTC
*** Bug 190986 has been marked as a duplicate of this bug. ***