Debugger doesn't break on exception?

P

Peter Duniho

And as long as I'm asking questions...

I can't figure out how to get the Eclipse debugger to break into a thread
automatically if a null reference exception occurs.

I know that Eclipse generally should do this, because the Windows version
works as I expected it to by default. But on the Mac, I can watch a null
reference exception come up in the console window, but the application
just keeps chugging away happily. I never break into the debugger as I
expected to.

The only setting I found that seems to relate to this is in the Java/Debug
preferences, and I do have it set ("Suspend execution on uncaught
exceptions"). I suppose by implication this may mean that the exception
was actually caught and handled somewhere. But where? How do I stop them
from being handled (if that is indeed the problem)? And why does it work
differently on the Mac than on Windows? Does this mean it's the JRE
that's actually getting in the way somehow?

Thanks!
Pete

(...and yes, I realize there are Eclipse newsgroups...I searched them and
found nothing on this particular topic, though queries that involve "null
reference exception" turn up lots of other stuff. I posted here because,
well...I don't need another username and password to do so and it seems
reasonably on-topic to me. I figure there's a good chance that at least
some of the folks here are using Eclipse and have some experience with
something like this :) ).
 
G

GArlington

And as long as I'm asking questions...

I can't figure out how to get the Eclipse debugger to break into a thread
automatically if a null reference exception occurs.

I know that Eclipse generally should do this, because the Windows version
works as I expected it to by default. But on the Mac, I can watch a null
reference exception come up in the console window, but the application
just keeps chugging away happily. I never break into the debugger as I
expected to.
<snip>

If "application just keeps chugging away happily" I suspect something
somewhere is catching that exception, otherwise it should fail/
crash... See uncaught exception behaviour...
 
L

Lew

Peter said:
because, well...I don't need another username and password to do so

I guess that's a function of your news server? I only need to provide one
name and password to my news server, and it serves up literally thousands of
newsgroups with no further authentication required. This lets me choose
newsgroups based on topic appropriateness rather than exogenous factors like
whether I need to log in again.

Of course, it might be that the specific Eclipse forums you wanted are on a
different news server. Mine only carries twelve groups that have the word
"eclips" in them, of which some have to do with astronomy and eight seem to do
with the IDE / platform. I can imagine an Eclipse newsgroup not in the
general public Usenet world, although I should think that would limit the
Eclipse community unnecessarily.
 
P

Peter Duniho

If "application just keeps chugging away happily" I suspect something
somewhere is catching that exception, otherwise it should fail/
crash... See uncaught exception behaviour...

Well, as I noted, that's my best guess as to what's happening. But why?
I know _my_ code isn't catching the exception, and generally my experience
is that debugging environments don't consider an exception handled by the
framework to be "caught". Granted, there's no hard-and-fast rule for
this, but using Eclipse in Windows the exception does cause the debugger
to break into the thread.

I was curious if anyone had any insight into the specific behavior for Mac
Eclipse.

Thanks,
Pete
 
P

Peter Duniho

Peter said:
because, well...I don't need another username and password to do so

I guess that's a function of your news server?
Nope.

[...] I can imagine an Eclipse newsgroup not in the general public
Usenet world, although I should think that would limit the Eclipse
community unnecessarily.

The newsgroups I'm referring to are those advertised on eclipse.org, and
they specifically say that they are private newsgroups and that you need
to send email to get a username and password for them.

That said, it should have occurred to me that there might still be regular
Usenet newsgroups for the IDE anyway, in spite of their own private
newsgroups. Thanks for pointing them out to me...I'll take a look.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top