Eclipse: debuging the mountain-climbing-way [message #436335] |
Tue, 06 September 2005 11:50 |
Eclipse User |
|
|
|
Originally posted by: dutz.c-ware.de
Hi,
I am working on a RCP application for quite a while now and have run
into the same problem several times now. What is the reason for using
these anoying try-finally blocks without even one catch? This is realy
anoying when debuging an application. There seems to be no way of
finding the reason for an exception if it is simply thrown away. At the
moment I step through the entire code seting breakpoints at the current
position and removing the ones bevore. This is sort of
Mointain-Climbing-Debugging and it realy suxx.
Is there any way to debug a plugin in a more professional way?
Christofer Dutz
|
|
|
|
Re: Eclipse: debuging the mountain-climbing-way [message #436362 is a reply to message #436335] |
Wed, 07 September 2005 12:18 |
Eclipse User |
|
|
|
Originally posted by: daniel.megert.gmx.net
Christofer Dutz wrote:
> Hi,
>
> I am working on a RCP application for quite a while now and have run
> into the same problem several times now. What is the reason for using
> these anoying try-finally blocks without even one catch?
There are many good reasons to do so. What's bad are empty catch blocks.
> This is realy anoying when debuging an application. There seems to be
> no way of finding the reason for an exception if it is simply thrown
> away. At the moment I step through the entire code seting breakpoints
> at the current position and removing the ones bevore. This is sort of
> Mointain-Climbing-Debugging and it realy suxx.
>
> Is there any way to debug a plugin in a more professional way?
Simply tell the Debugger to stop when an given exception occurs. If you
don't know which one it is start with the most specific you suspect
(e.g. exceptionally).
Dani
>
> Christofer Dutz
|
|
|
|
Re: Eclipse: debuging the mountain-climbing-way [message #436521 is a reply to message #436339] |
Sun, 11 September 2005 12:30 |
Eclipse User |
|
|
|
Originally posted by: dutz.c-ware.de
Ed Burnette wrote:
> Could you name a few examples?
Sorry for the late reply, but I was sick this week :(
Unfortunately I didn't write up the exact locations, but I found try
blocks with finally without any chatch all over the place.
Chris
|
|
|
Re: Eclipse: debuging the mountain-climbing-way [message #436522 is a reply to message #436362] |
Sun, 11 September 2005 12:32 |
Eclipse User |
|
|
|
Originally posted by: dutz.c-ware.de
Daniel Megert wrote:
> Christofer Dutz wrote:
>
>> Hi,
>>
>> I am working on a RCP application for quite a while now and have run
>> into the same problem several times now. What is the reason for using
>> these anoying try-finally blocks without even one catch?
>
>
> There are many good reasons to do so. What's bad are empty catch blocks.
Well how about a log-output of type debug? Since Eclipse is not a
finished Product I think this could help a lot of development problems.
>> This is realy anoying when debuging an application. There seems to be
>> no way of finding the reason for an exception if it is simply thrown
>> away. At the moment I step through the entire code seting breakpoints
>> at the current position and removing the ones bevore. This is sort of
>> Mointain-Climbing-Debugging and it realy suxx.
>>
>> Is there any way to debug a plugin in a more professional way?
>
>
> Simply tell the Debugger to stop when an given exception occurs. If you
> don't know which one it is start with the most specific you suspect
> (e.g. exceptionally).
Heheh ... have you tried that? I have and I ended up in all sorts of
places ;)
Christofer Dutz
> Dani
>
>>
>> Christofer Dutz
|
|
|
Re: Eclipse: debuging the mountain-climbing-way [message #436523 is a reply to message #436414] |
Sun, 11 September 2005 12:34 |
Eclipse User |
|
|
|
Originally posted by: dutz.c-ware.de
Alex Blewitt wrote:
> A 'try/finally' block does /not/ throw the exception away. The code abnormally exits in the middle of the try block, then the finally block is executed (often doing some kind of cleanup), then the exception is propagated outwards as normal. It doesn't affect anything that may be expecting an exception; it will still be reported.
Hmmm ... that was what I first thought too. Unfortunately I step through
the eclipse code and suddenly I jump into the finally block and after
that no Exception is to be found anymore. Where has it gone?
Chris
|
|
|
|
Powered by
FUDForum. Page generated in 0.03321 seconds