ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > Living Room

Java debugging in Eclipse

(1/3) > >>

Josh:
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:
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.popcornfarmer.com/gamedev/2009/01/eclipse-debug-error/
  http://www.eclipse.org/forums/index.php?t=msg&th=174522&start=0
  http://stackoverflow.com/questions/4525334/debug-in-eclipse-classnotfoundexception

Perhaps you already found those, but FWIW.


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

  http://www.vogella.com/articles/EclipseDebugging/article.html

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

ewemoa:
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:
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.

ewemoa:
Glad to hear you got things working :)

Thanks a lot for the update :up:

Navigation

[0] Message Index

[#] Next page

Go to full version