Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 28693

Summary: Frequent short-lived thread make debugger unusable
Product: [Eclipse Project] JDT Reporter: Mario Cormier <w3aponx>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3    
Version: 2.0.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Mario Cormier CLA 2002-12-19 14:50:16 EST
I'm trying to debug a server application that I'm launching in Eclipse.  This 
application creates a LOT of threads, many short-lived and not meaningful to 
the problem at hand (the JDBC driver we use needs them it would seem).  The 
problem is that whenever one of these threads gets created and/or dies, the 
debug perspective changes to show the source code to Thread.class, the thread 
view changes to the thread in question.  The end result is that I don't have 
time to do anything meaningful before I'm yanked out of context by 
this "feature".

What I would like is a way to disable that refocusing altogether, or to filter 
out the one case that is giving me so much trouble.  I went over ALL the 
preference dialogs in 2.0.2 and couldn't find anything helpful.
Comment 1 Darin Wright CLA 2002-12-19 15:04:38 EST
The debugger only shows source if the thread suspsneds. Does the thread 
suspend? If so, why? is there a breakpoint or exception being thrown?
Comment 2 Mario Cormier CLA 2002-12-19 15:24:37 EST
What happens is a ThreadDeath *Error*, which is Throwable but not a sub-class 
Exception.  That's what threw me off.

The pattern they seem to use is to launch a thread to cancel long running 
operations.  If the operation completes within the acceptable time limit, the 
thread killer is simply stopped, which causes the ThreadDeath.  Turning 
off "suspend on uncaught exception" fixes my problem, but a little more 
flexibility than all-or-nothing would be nice.  Specifically I'm thinking of 
simply filtering out some special cases like that while still being notified 
of other uncaught exceptions.  I know you can add breakpoints for specific 
exceptions, but that seems tedious if what you want is "all exceptions but 
these few".

I'll leave it up to you to decide if you want to close this bug or turn it 
into an enhancement request.  You did help me solve the problem at hand 
though.  Thanks a lot.
Comment 3 Darin Wright CLA 2002-12-19 15:34:00 EST
No plans to change this support for 2.1. Marking as later for future 
consideration.
Comment 4 Darin Wright CLA 2004-08-26 11:24:26 EDT
open for 3.1
Comment 5 Darin Wright CLA 2004-08-26 11:26:28 EDT
(meant to mark as dup).

*** This bug has been marked as a duplicate of 23044 ***