Results 1 to 8 of 8
  1. #1
    ark
    ark is offline Senior Member
    Join Date
    Apr 2015
    Posts
    288
    Rep Power
    6

    Default Debugging in eclipse

    I have already asked yesterday - how to debug the error (how to know the name and type of exception) in Ecclipse?
    Then I have one error - and I have just information about its location no nore -- when tried to use Debug button -- igot the same information about errors and nothing more as during Build.

  2. #2
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,995
    Rep Power
    9

    Default Re: Debugging in eclipse

    The debug button is useful if you have set a breakpoint in your code. (Help - Eclipse Platform). The debugger will stop there and you can inspect your code to see what variables contain at runtime, or how a counter changes over time.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2™ © 2013

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    27

    Default Re: Debugging in eclipse

    Quote Originally Posted by ark View Post
    I have already asked yesterday - how to debug the error (how to know the name and type of exception) in Ecclipse?
    Then I have one error - and I have just information about its location no nore -- when tried to use Debug button -- igot the same information about errors and nothing more as during Build.
    What exact error are you talking about?
    I ask, because in this thread you are attempting to execute code that doesn't actually compile.
    You can't run code that doesn't compile, and you can't therefore debug code that doesn't compile.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  4. #4
    benji2505 is offline Senior Member
    Join Date
    Sep 2014
    Location
    MA, USA
    Posts
    399
    Rep Power
    6

    Default Re: Debugging in eclipse

    If you have the location of the problem, but don't understand what's wrong, it might help if you put the code in question in a try- catch statement that catches all exceptions and then prints out the stacktrace. That helps sometimes.

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    27

    Default Re: Debugging in eclipse

    I really think the issue is ark is trying to run something that doesn't actually compile.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  6. #6
    benji2505 is offline Senior Member
    Join Date
    Sep 2014
    Location
    MA, USA
    Posts
    399
    Rep Power
    6

    Default Re: Debugging in eclipse

    Quote Originally Posted by Tolls View Post
    I really think the issue is ark is trying to run something that doesn't actually compile.
    hmmmmm - shouldn't the buggy code be all red then? In many if not most cases eclipse should already have the solution prepared, right? And eclipse should warn you if you attempt to run it.

    The only issue I run into with eclipse are cases where code compiles, throws an error and feeds back cryptic descriptions. Classic examples are malformed URIs/URLs. These I solve with try-catch, the stack trace to that exception has better info imho.

  7. #7
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    27

    Default Re: Debugging in eclipse

    Have a look at the thread I linked to in post #3.
    There ark is asking how to get stack trace for this:
    "Exception in thread "main" java.lang.Error: Unresolved compilation problem
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  8. #8
    benji2505 is offline Senior Member
    Join Date
    Sep 2014
    Location
    MA, USA
    Posts
    399
    Rep Power
    6

    Default Re: Debugging in eclipse

    Quote Originally Posted by Tolls View Post
    Have a look at the thread I linked to in post #3.
    There ark is asking how to get stack trace for this:
    "Exception in thread "main" java.lang.Error: Unresolved compilation problem
    I did not read the cross reference. The error message should be self-explanatory, I agree.

Similar Threads

  1. Eclipse Debugging Help
    By kuttam in forum Eclipse
    Replies: 5
    Last Post: 12-02-2011, 09:28 AM
  2. Debugging with Eclipse 3.4.0
    By edcaru in forum New To Java
    Replies: 2
    Last Post: 11-07-2008, 06:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •