Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Thread-specific breakpoints
Thread-specific breakpoints [message #267045] Mon, 16 August 2004 09:15 Go to next message
Eclipse UserFriend
Originally posted by: cenedese.nospam.indel.ch

Hi

Java allows to have different threads. Does Eclipse provide ui elements
to work with thread-specific breakpoints? So a new menu entry/shortcut
which will first ask for a thread (id) before putting a breakpoint. I
don't even know if java itself supports thread-specific breakpoints.
I just thought I'd ask about Eclipse.

These elements could also be useful for other tools (like cdt) which
could support thread-specific breakpoints.

Thanks

bye Fabi
Re: Thread-specific breakpoints [message #267072 is a reply to message #267045] Mon, 16 August 2004 11:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.rizzoweb.com

Fabi wrote:
> Hi
>
> Java allows to have different threads. Does Eclipse provide ui elements
> to work with thread-specific breakpoints? So a new menu entry/shortcut
> which will first ask for a thread (id) before putting a breakpoint. I
> don't even know if java itself supports thread-specific breakpoints.
> I just thought I'd ask about Eclipse.

Yes, you can right-click on a breakpoint and choose Properties. There,
under the Filtering option, you can restrict the breakpoint to whatever
thread is selected in your Debug view.

Another way would be to set a condition for the breakpoint that checked
the executing thread against some known thread.

HTH,
Eric
Re: Thread-specific breakpoints [message #267276 is a reply to message #267072] Tue, 17 August 2004 05:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cenedese.nospam.indel.ch

> > Java allows to have different threads. Does Eclipse provide ui elements
> > to work with thread-specific breakpoints? So a new menu entry/shortcut
> > which will first ask for a thread (id) before putting a breakpoint. I
> > don't even know if java itself supports thread-specific breakpoints.
> > I just thought I'd ask about Eclipse.

> Yes, you can right-click on a breakpoint and choose Properties. There,
> under the Filtering option, you can restrict the breakpoint to whatever
> thread is selected in your Debug view.

But this means that the program needs to be run and stopped first.
Otherwise
there aren't any threads to choose from. And the information gets lost when
the program is stopped, the filter needs to be applied on each run.

Thanks anyway

bye Fabi
Re: Thread-specific breakpoints [message #267328 is a reply to message #267276] Tue, 17 August 2004 10:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.rizzoweb.com

Fabi wrote:

>>>Java allows to have different threads. Does Eclipse provide ui elements
>>>to work with thread-specific breakpoints? So a new menu entry/shortcut
>>>which will first ask for a thread (id) before putting a breakpoint. I
>>>don't even know if java itself supports thread-specific breakpoints.
>>>I just thought I'd ask about Eclipse.
>
>
>>Yes, you can right-click on a breakpoint and choose Properties. There,
>>under the Filtering option, you can restrict the breakpoint to whatever
>>thread is selected in your Debug view.
>
>
> But this means that the program needs to be run and stopped first.
> Otherwise
> there aren't any threads to choose from. And the information gets lost when
> the program is stopped, the filter needs to be applied on each run.
>
> Thanks anyway

How else can you tell it what Thread you want to stop in, until you see
the threads that exist? There is no way to specify a thread until it
exists, so it has to be on a per-run basis.
Unless you are thinking of something else...

Eric
Re: Thread-specific breakpoints [message #267467 is a reply to message #267328] Wed, 18 August 2004 03:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cenedese.nospam.indel.ch

> >>>Java allows to have different threads. Does Eclipse provide ui elements
> >>>to work with thread-specific breakpoints? So a new menu entry/shortcut
> >>>which will first ask for a thread (id) before putting a breakpoint. I
> >>>don't even know if java itself supports thread-specific breakpoints.
> >>>I just thought I'd ask about Eclipse.
> >
> >>Yes, you can right-click on a breakpoint and choose Properties. There,
> >>under the Filtering option, you can restrict the breakpoint to whatever
> >>thread is selected in your Debug view.
> >
> > But this means that the program needs to be run and stopped first.
> > Otherwise
> > there aren't any threads to choose from. And the information gets lost when
> > the program is stopped, the filter needs to be applied on each run.

> How else can you tell it what Thread you want to stop in, until you see
> the threads that exist? There is no way to specify a thread until it
> exists, so it has to be on a per-run basis.
> Unless you are thinking of something else...

Well, that's more part of the CDT, but I'm also looking into using eclipse
as IDE for our embedded system. This fully supports thread-specific
breakpoints. The thread is identified by name so it will always be the
same on any run. But to use this functionality I need support in the GUI
from eclipse.
The setting of the filter should at least be possible on setting the
breakpoint and not afterwards. Because if the communication thread goes on
break I have no possibility anymore to apply any filter to the
breakpoint...

Thanks

bye Fabi
Re: Thread-specific breakpoints [message #267567 is a reply to message #267467] Wed, 18 August 2004 11:20 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse.rizzoweb.com

Fabi wrote:

> Well, that's more part of the CDT, but I'm also looking into using
eclipse
> as IDE for our embedded system. This fully supports thread-specific
> breakpoints. The thread is identified by name so it will always be the
> same on any run. But to use this functionality I need support in the GUI
> from eclipse.

Instead of a Filter, you can set a Condition on the breakpoint that
checks the current thread against the name you want to stop in.
Something like this:

"YourThreadName".equals(Thread.currentThread().getName())

HTH,
Eric
Previous Topic:TableTreeViewer problem
Next Topic:Class loading of PLUGIN
Goto Forum:
  


Current Time: Wed May 07 20:00:04 EDT 2025

Powered by FUDForum. Page generated in 0.13932 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top