topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday December 15, 2024, 4:39 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Java debugging in Eclipse  (Read 6828 times)

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: 45
  • Posts: 3,411
    • View Profile
    • Donate to Member
Java debugging in Eclipse
« on: January 01, 2013, 11:01 AM »
OK, crazy question, but is there some trick to debugging a project in Eclipse? Ideally, I would like to start my code in debug mode and step through it without the need for breakpoints. Right now, when I set a breakpoint, some applications generate "Class Not Found Exceptions" and others generate "Thread.exit() not found" at the close of the application, despite running fine when executed normally, with appropriate results.

Is there some trick to debugging in Eclipse?

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Java debugging in Eclipse
« Reply #1 on: January 01, 2013, 06:28 PM »
Don't have a good answer for you, but I'd like to know what's going on.

Here is what came up from a search:

  http://www.popcornfa...eclipse-debug-error/
  http://www.eclipse.o...h=174522&start=0
  http://stackoverflow...assnotfoundexception

Perhaps you already found those, but FWIW.



On a side note, came across the following tutorial on debugging in Java:

  http://www.vogella.c...bugging/article.html

Again, may be you're familiar with it, but FWIW.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Java debugging in Eclipse
« Reply #2 on: January 01, 2013, 06:35 PM »
BTW, I tried creating the Hello World program mentioned in:

  Getting Started with Eclipse

and managed to run it under Eclipse's (3.8.0) debugger with no problems -- with a breakpoint set at the line "System.out.println("Hello World");".

Does that work for you?


Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: 45
  • Posts: 3,411
    • View Profile
    • Donate to Member
Re: Java debugging in Eclipse
« Reply #3 on: January 05, 2013, 07:39 PM »
ewemoa, thanks for the replies. I have solved my issue with debugging. Apparently, for debugging to work as I want it to, I have to enable step filters and filter out all java libraries from the debug process. By default, source files are not included for Java and as such, results in the error messages I was encountering. There was never a problem with my code, just that eclipse could not find the source for the JDK.

Below is a screenshot of the settings that need to be enabled to get rid of these error messages.

2013-01-05_203729.png

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Java debugging in Eclipse
« Reply #4 on: January 05, 2013, 08:17 PM »
Glad to hear you got things working :)

Thanks a lot for the update :up:

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: Java debugging in Eclipse
« Reply #5 on: January 05, 2013, 09:00 PM »
Why do people still use eclipse instead of the superior IntelliJ platform?

barney

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,294
    • View Profile
    • Donate to Member
Re: Java debugging in Eclipse
« Reply #6 on: January 05, 2013, 09:12 PM »
Why do people still use eclipse instead of the superior IntelliJ platform?

Maybe it's the $200 US price tag.  That's a bit steep when there are freebies available to do much the same thing, doncha thimk?  Yeah, it's free for open source development, according to JetBrains, but just how do they define open source?  I've seen some pretty iffy offers from JetBrains, and their support, at least in my experience, has been less than stellar.

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: Java debugging in Eclipse
« Reply #7 on: January 05, 2013, 09:13 PM »
I never needed support for eclipse, so I can't really tell much about the difference here.

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: 45
  • Posts: 3,411
    • View Profile
    • Donate to Member
Re: Java debugging in Eclipse
« Reply #8 on: January 05, 2013, 09:19 PM »
Honestly, I am contemplating a move to Oracle's JDevelop. It is far superior in terms of usability. I am holding off until the release of 12c with mobile support built in. Right now, you have to install ADT and a few other things to get mobile support, and even then it is kind-of clunky.

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: Java debugging in Eclipse
« Reply #9 on: January 05, 2013, 09:21 PM »
IDEs mostly written in slow Java make me puke. Generally. (I wonder what IntelliJ is built upon.)
Never seen a good application starting with a capital J.

edit:
JDeveloper, not JDevelop, right?

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: 45
  • Posts: 3,411
    • View Profile
    • Donate to Member
Re: Java debugging in Eclipse
« Reply #10 on: January 05, 2013, 09:42 PM »
IDEs mostly written in slow Java make me puke. Generally. (I wonder what IntelliJ is built upon.)
Never seen a good application starting with a capital J.

edit:
JDeveloper, not JDevelop, right?

Po-tat-o, Po-tot-o

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: Java debugging in Eclipse
« Reply #11 on: January 05, 2013, 09:44 PM »
Could you elaborate on that?