Debugger doesn't break on exception?

Discussion in 'Java' started by Peter Duniho, Jan 21, 2008.

  1. Peter Duniho

    Peter Duniho Guest

    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 :) ).
     
    Peter Duniho, Jan 21, 2008
    #1
    1. Advertising

  2. Peter Duniho

    GArlington Guest

    On Jan 21, 8:05 am, "Peter Duniho" <>
    wrote:
    > 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...
     
    GArlington, Jan 21, 2008
    #2
    1. Advertising

  3. Peter Duniho

    Lew Guest

    Peter Duniho wrote:
    > 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.

    --
    Lew
     
    Lew, Jan 21, 2008
    #3
  4. Peter Duniho

    Peter Duniho Guest

    On Mon, 21 Jan 2008 04:42:07 -0800, GArlington <>
    wrote:

    > 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
     
    Peter Duniho, Jan 22, 2008
    #4
  5. Peter Duniho

    Peter Duniho Guest

    On Mon, 21 Jan 2008 06:23:52 -0800, Lew <> wrote:

    > Peter Duniho wrote:
    >> 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
     
    Peter Duniho, Jan 22, 2008
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kathy Burke
    Replies:
    3
    Views:
    1,415
    Kathy Burke
    Dec 30, 2003
  2. Praveena

    Debugger doent stop at break points

    Praveena, Jun 9, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    403
    Curt_C [MVP]
    Jun 9, 2004
  3. =?Utf-8?B?TGlicw==?=
    Replies:
    0
    Views:
    315
    =?Utf-8?B?TGlicw==?=
    Jul 27, 2006
  4. Replies:
    12
    Views:
    988
  5. Sara
    Replies:
    2
    Views:
    83
    Bill Smith
    Dec 23, 2003
Loading...

Share This Page